nautobot / nautobot-app-netbox-importer

Nautobot plugin to simplify data migration from NetBox
https://docs.nautobot.com/projects/netbox-importer/en/latest/
Other
20 stars 11 forks source link

Duplicate address warning on VRRP addresses #27

Closed ggiesen closed 3 years ago

ggiesen commented 3 years ago

Environment

Expected Behavior

Import data from NetBox 2.10.7

Observed Behavior

14:37:39 Apparent duplicate object encountered. This may be an issue with your source data or may reflect a bug in this plugin. model=ipaddress "10.99.21.129/26__{'name': 'MGMT', 'rd': '64512:', 'tenant': {'name': 'Tenant'}}__{'name': 'Tenant'}__None__None" model_id=10.99.21.129/26__{'name': 'MGMT', 'rd': '64512:', 'tenant': {'name': 'Tenant'}}__{'name': 'Tenant'}__None__None

Note the above address is indeed duplicated, as it is a VRRP address, and VRRP addresses are permitted to be duplicated in NetBox

Steps to Reproduce

  1. $ sudo -u postgres psql
  2. postgres=# DROP DATABASE nautobot;
  3. postgres=# CREATE DATABASE nautobot;
  4. postgres=# GRANT ALL PRIVILEGES ON DATABASE nautobot TO nautobot;
  5. $ sudo systemctl restart nautobot nautobot-worker
  6. $ nautobot-server migrate
  7. $ nautobot-server createsuperuser
  8. $ nautobot-server collectstatic
  9. $ nautobot-server check
  10. $ python netbox/manage.py dumpdata --traceback --format=json --exclude admin.logentry --exclude sessions.session --exclude extras.ObjectChange --exclude extras.Script --exclude extras.Report > /tmp/netbox_data.json
  11. $ nautobot-server import_netbox_json /tmp/netbox_data.json 2.10.5
glennmatthews commented 3 years ago

Thanks for the report!

glennmatthews commented 3 years ago

I believe this issue to have been fixed (most likely by #28) in the latest version of this plugin. If you're still encountering it, feel free to comment and I'll re-open this issue for further investigation. Thanks!