bb-Ricardo/netbox-sync

Faux-duplicate IPs (anycast or across VLANs)

Azmodeszer opened this issue · 6 comments

I'm running into a primary IP assignment warning:

WARNING: Current interface 'vNIC 1 (Office) (<SERVER1>)' for IP '1.2.3.4/21' and this one 'vNIC 1 (Virtual LAB) (<SERVER2>)' are both enabled. IP assignment skipped because it is unclear which one is the correct one!

Okay, fair enough, but the thing here is that that's two different VLANs, one used to simulate the other and exactly map it. So the IPs being the same is as it should be. The sync already imports the VLANs for each device's interface correctly, so is there a way to tell it to ignore the warning and set the IPs if the VLANs differ?

Related to this, I'm also getting a lot of similar warnings where the IP in question has the anycast role (so again, assignment to both NICs makes sense). Is there a way around this in the settings.ini file? Netbox itself drops the duplicate IP warning if it detects the anycast role, wondering if the plugin has something analogous.

Hi,

does your use case apply to AnyCast IP addresses only or are there other types of IP addresses where this also causes issues?

Well, anycast and a few select cases with the VLANs from the opening post. I can live with the latter, since it's no doubt a very uncommon setup, but anycast IPs by their very nature shouldn't trigger the warning, no?

As far as I can see, all other cases are legitimate duplicate IPs that the plugin is right to warn about (our Netbox db still needs some major cleanup).

For anycast it should definitely be possible. Will need to add a check if IP is defined as an anycast address. Gonna have a look into it.

I'd very much appreciate it. Thank you!

Any progress on this? :)