DNS provisioning needs to allow foreign ID to be a hash of IP address instead of nodeLabel if administrator so chooses

Description

In some cases, the opennms administrator may choose to have the foreign ID be tied to IP address instead of node label. for DNS provisioned nodes The implications of using the IP address to create a hash for the foreign ID are:
1. if a node changes names but keeps the same address it will NOT be deleted and recreated as a new node.
2. If a node changes ip addresses but keeps the same node label, it WILL be deleted and recreated as a new node created.
The behavior is just the opposite when using the nodeLabel. Default should be to use the node label, which is the case in existing releases.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Bill Ayres June 23, 2011 at 1:09 PM

fixed URL validity check.
commit d896297586ab28539aede084881e2980e6cd1ddb

Bill Ayres June 22, 2011 at 5:21 PM

When provisioning from DNS, the foreignID for a node is a hash of the nodeLabel. Add an
optional field to the query string of the DNS URL, like so:

dns://my-dns-server/myzone.com/portland/?expression=^por-.*&foreignIdHashSource=someString

if someString contains 'ip' or 'addr' the IP address of the node will be used to generate the hash for the foreignID

if someString contains 'label' or 'name' the nodeLabel will be used to generate the hash. This is the same as the default, and the original behavior.

if someString contains both 'label' or 'name' AND 'ip' or 'addr' the hash will be generated from the string concatenation of the nodeLabel and the IP address.

Bill Ayres June 22, 2011 at 5:04 PM

Pushed two commits for this
commit 35d064d56bd55000bcdf3f5d158e291242b39869
commit 22dc9758dc2df6f4f0009bcab375c26ba606a10e

Bill Ayres June 21, 2011 at 10:28 PM

patch pushed to 1.9.90

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

PagerDuty

Created June 21, 2011 at 10:16 PM
Updated January 27, 2017 at 4:21 PM
Resolved June 21, 2011 at 10:28 PM

Flag notifications