-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IP address marked as orphaned when vNIC changes portgroup #193
Comments
Hi, You are correct, this is happening. This would need a validation run to see if an IP address in NetBox is still assigned to the same interface. I have to think about, how to solve this in the process logic. |
Hey @gstorme, I could actually easily add this. If the scope is the same device/VM then it is pretty straight forward. in the long run you should think about switching to a different Linux distribution if this keeps happening. The network device order should not change on any system update. |
Hey @gstorme, I just pushed a change to "development" which should fix this issue. Can you please try it out if this resolves your issue? |
Looks good, thanks! |
Great, thank you for the feedback |
Hi,
When switching the portgroup of 2 existing interfaces, that had IP addresses assigned to them, the IP's are marked as orphaned.
They are also deleted according to the prune settings, and only during the sync that occurs after the delete action, they're added back to the changed interface.
More detail:
IP address 5.x.4.21/23 created by vcenter-sync
During same sync, the object is updated with the sync tags:
IP address 5.x.4.21/23 updated by vcenter-sync
Weeks later, the VM gets a dist-upgrade and this causes Debian to mix up the interfaces after a reboot, and someone fixes this by changing the VM interfaces to the corresponding portgroups.
Situation before:
vNIC1 -> HCL PUB 2489
vNIC2 -> portgroup abc
vNIC3 -> portgroup def
vNIC4 -> Netapp102 ClientMounts 3102
Situation after:
vNIC1 -> Netapp102 ClientMounts 3102
vNIC2 -> portgroup abc
vNIC3 -> portgroup def
vNIC4 -> HCL PUB 2489
After this action, the sync log states:
And the sync tags all the IP addresses of vNIC4 (previously vNIC1) as orphaned.
After the
prune_delay_in_days
is over, the IP address is deleted.Only on the first sync after the sync deleted the IP's, the IP addresses are added back, and assigned to the correct vNIC.
Is it possible to detect this and link the IP addresses to the correct vNIC, instead of having the current flow where there's a gap and it seems the IP address does not exist between the sync where the prune action happens & the first sync after that?
The text was updated successfully, but these errors were encountered: