Installed via pip3.8 in venv
I'm installing netbox-sync via venv in /opt/dcim/netbox (symlinked to the correct folder) but I can't find it after installing via pip3.8.
Hi,
This is a bit short to make any assumptions. Can you paste all comands you used to install netbox sync and also how you start the script and what the output of this attempt looks like?
Thank you.
Sure!
sudo su - netbox source /opt/dcim/netbox/venv/bin/activate pip3.8 install netbox-sync pip3.8 install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
After running this I can't find the settings.ini or the netbox_sync.py.
I'm runningthis on AlmaLinux 8.6 btw.
Hi,
As far as I know, netbox-sync is not available via pip.
There are installation instructions included for RHEL 8 based systems in the README file.
Can you please try this and see if it works?
Thank you.
I'll take a look and report back if I have issues. Thank you!
ok got it working manually. thanks! Still trying to figure out redfish though.
Got it working but getting the following error:
2022-09-23 14:25:57,416 - DEBUG: Processing 1 returned power port
2022-09-23 14:25:57,417 - INFO: Finished querying necessary objects from NetBox
2022-09-23 14:25:57,417 - DEBUG: Start resolving relations
2022-09-23 14:25:57,433 - DEBUG: Finished resolving relations
2022-09-23 14:25:57,433 - WARNING: Starting purge now. All objects with the tag 'NetBox-synced' will be deleted!!!
2022-09-23 14:25:57,433 - DEBUG: Iteration 1 trying to deleted all the objects.
2022-09-23 14:25:57,434 - DEBUG: Iteration 2 trying to deleted all the objects.
2022-09-23 14:25:57,435 - DEBUG: Iteration 3 trying to deleted all the objects.
2022-09-23 14:25:57,435 - DEBUG: Iteration 4 trying to deleted all the objects.
2022-09-23 14:25:57,436 - DEBUG: Iteration 5 trying to deleted all the objects.
2022-09-23 14:25:57,437 - DEBUG: Iteration 6 trying to deleted all the objects.
2022-09-23 14:25:57,437 - DEBUG: Iteration 7 trying to deleted all the objects.
2022-09-23 14:25:57,438 - DEBUG: Iteration 8 trying to deleted all the objects.
2022-09-23 14:25:57,439 - DEBUG: Iteration 9 trying to deleted all the objects.
2022-09-23 14:25:57,439 - DEBUG: Iteration 10 trying to deleted all the objects.
2022-09-23 14:25:57,440 - WARNING: Unfortunately we were not able to delete all objects. Sorry
[netbox@dcim001 netbox-sync]$
Hi,
you try to purge all objects created by netbox-sync? Can you try to use DEBUG2 log level to get more information?
Yes I used the -p to purge it all and the output I provided was from DEBUG3.
Are there still objets left in NetBox which are "pruneable"? quite a lot are shared objects which netbox-sync won't delete, like cluster or sites.
You can check the object definition here: https://github.com/bb-Ricardo/netbox-sync/blob/main/module/netbox/object_classes.py#L1172
If prune = False then this object won't be deleted.
Currently only these object will be removed:
- devices
- VMs
- interfaces
- IP addresses
- inventory item
- power port
Yes. There are plenty of objects to be pruned. Stuff I entered manually.
Hi,
I don't really understand. You created objects manually and the script is meant to prune them?
I assumed that it would do that. If not, I will delete all the objects I created and let the script do it.
As mentioned the Script only would delete objects created or adopted by the script.
I might just completely remove this option.