Django.db.utils.IntegrityError: insert or update on table while mi8grating netbox > nautobot using nautobot-netbox-importer

Я пытаюсь перенести данные из Netbox 3.7.4 в Nautobot 2.X с помощью nautobot-netbox-importer. Я пробовал миграцию с данными netbox-demo.3.7. и все работало нормально, но с данными, которые у меня есть, я получаю эту ошибку >

sys.exit(main())
  File "/opt/nautobot/lib/python3.10/site-packages/nautobot/core/cli/__init__.py", line 293, in main
    execute_from_command_line([sys.argv[0], *unparsed_args])
  File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/nautobot/lib/python3.10/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/management/commands/import_netbox.py", line 89, in handle
    adapter.import_to_nautobot()
  File "/opt/nautobot/lib/python3.10/site-packages/nautobot_netbox_importer/diffsync/adapters/netbox.py", line 97, in import_to_nautobot
    self._atomic_import()
  File "/usr/lib/python3.10/contextlib.py", line 78, in inner
    with self._recreate_cm():
  File "/opt/nautobot/lib/python3.10/site-packages/django/db/transaction.py", line 246, in __exit__
    connection.commit()
  File "/opt/nautobot/lib/python3.10/site-packages/django/utils/asyncio.py", line 33, in inner
    return func(*args, **kwargs)
  File "/opt/nautobot/lib/python3.10/site-packages/django/db/backends/base/base.py", line 266, in commit
    self._commit()
  File "/opt/nautobot/lib/python3.10/site-packages/django/db/backends/base/base.py", line 241, in _commit
    with self.wrap_database_errors:
  File "/opt/nautobot/lib/python3.10/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/opt/nautobot/lib/python3.10/site-packages/django/db/backends/base/base.py", line 242, in _commit
    return self.connection.commit()
django.db.utils.IntegrityError: insert or update on table "dcim_device" violates foreign key constraint "dcim_device_primary_ip4_id_2ccd943a_fk_ipam_ipaddress_id"
DETAIL:  Key (primary_ip4_id)=(some UUID) is not present in table "ipam_ipaddress".

Я пробовал несколько вещей, таких как 1. Снятие ограничений в DB 2. Отключение ограничений внешних ключей, но ничего не помогло. Может ли кто-нибудь указать мне правильное направление?

Вернуться на верх