Details
Assignee
David HustaceDavid HustaceReporter
Philippe GuillebertPhilippe GuillebertComponents
Affects versions
Priority
Minor
Details
Details
Assignee
David Hustace
David HustaceReporter
Philippe Guillebert
Philippe GuillebertComponents
Affects versions
Priority
PagerDuty
PagerDuty
PagerDuty
Created June 3, 2009 at 4:23 AM
Updated September 21, 2021 at 9:14 PM
We've got a little issue with the current Rancid integration : our nodeLabels are arbitrary (not ip, not DNS names). So, in our Rancid configuration (router.db), we use primary IP addresses as names.
And, with the current SVN HEAD, InventoryService uses nodeLabel and supposes it's the name in router.db.
This patches adds a fallback : when the node cannot be found by label, it tries to use primaryInterface or the first interface it finds.
It's tested and works for me 😉
I'm puzzled about :
OnmsIpInterface primaryInterface = node.getPrimaryInterface();
It should give me the primaryInterface, but doesn't, even for nodes where there is a 'P' in the column issnmpprimary in the ipinterface table.
Am I getting the primary interface concept right ?
So I borrowed code from another function in RancidProvisioningAdapter ( getSuitableIpForRancid() ) and that's why, in the patch, I get all interfaces and pick the first. Not very elegant, but it works.