-
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
[VCenter] IP addresses marked as orphan when VM is turned off #192
Comments
Hi, I have a look. This is not meant to happen. |
Yeah thank you, in the meantime I'll try to do some other tests. |
Hey @rizlas, I just checked and figured this is the default. If the VM is stopped, the IP address is not visible via the VMWare API. |
Unlucky, thank you for digging into this. Sorry also about the issue. |
Don't be sorry about opening an issue. It usually is an "issue" or "unwanted behaviour". I also thought about this. It seems a bit difficult to implement but: |
Good point! Maybe netbox-sync can change only the status of the IpAddress to Reserverd when a VM has an offline status? Just an idea.. |
Hi, i JUST implemented this. Now the IP address will not be marked orphaned if it belongs to a device/vm object which is present but not in status "active". |
Amazing! Thank you! |
fix is pushed to "development" branch. Can you please test it out? |
So i tried:
|
Hi, I don't really know what are the preconditions to your findings. Unfortunately I won't be able to test it by myself. here is the relevant code: netbox-sync/module/netbox/inventory.py Lines 314 to 325 in c4e0e77
Enabling or disabling Does this information help? |
Preconditions are: VM has state set to Offline, IP address bonded to that VM is already been tagged has orphan. |
A better explanation.. Currently the update works, but it's is not backward compatible especially if a tag is already there it is not cleaned. |
This is still ongoing? |
Hi, yes this is still ongoing. Need to take care of it when syncing from NetBox. Only did the part with syncing to NetBox. Currently on holidays and will have a look once I'm back. |
1 similar comment
Hi, yes this is still ongoing. Need to take care of it when syncing from NetBox. Only did the part with syncing to NetBox. Currently on holidays and will have a look once I'm back. |
Ah don't worry. It was only for information. Enjoy your holiday 👍🏻 |
Hi @rizlas, sorry for the long wait. I'm back again and I just pushed another change to You can close the ticket if the issue is resolved. |
Hi, thank you. It is working. Test:
|
Thank you for testing |
Hi,
I recently noted that if a VM is turned off the IPs synced in NetBox are marked as orphans. This could lead to a misunderstanding in IPAM documentation because after "orphans cleanup/deletion" that IPs are marked as "free to use" in NetBox but actually they aren't.
Currently running v1.2.3
The text was updated successfully, but these errors were encountered: