Skip to content
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

Fail after upgrading to version 2.2.2 #386

Open
mzambrano-tc opened this issue Oct 29, 2024 · 0 comments
Open

Fail after upgrading to version 2.2.2 #386

mzambrano-tc opened this issue Oct 29, 2024 · 0 comments

Comments

@mzambrano-tc
Copy link

Environment

  • Python version: 3.11.2
  • Nautobot version: 2.3.9
  • nautobot-device-lifecycle-mgmt version: 2.2.0

Fail after upgrading

Expected Behavior

Post-upgrade scripts without errors

Observed Behavior

Fails when upgrading to the latest version

Steps to Reproduce

  1. run nautobot-server post_upgrade
Performing database migrations...
Operations to perform:
  Apply all migrations: admin, auth, circuits, cloud, constance, contenttypes, dcim, django_celery_beat, django_celery_results, extras, ipam, nautobot_bgp_models, nautobot_device_lifecycle_mgmt, nautobot_ui_plugin, sessions, silk, social_django, taggit, tenancy, users, virtualization
Traceback (most recent call last):
  File "/opt/nautobot/bin/nautobot-server", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/nautobot/lib/python3.11/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.11/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
    utility.execute()
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/__init__.py", line 436, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/base.py", line 412, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/nautobot/core/management/commands/post_upgrade.py", line 91, in handle
    call_command(
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/__init__.py", line 194, in call_command
    return command.execute(*args, **defaults)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/base.py", line 458, in execute
    output = self.handle(*args, **options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/base.py", line 106, in wrapper
    res = handle_func(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/core/management/commands/migrate.py", line 302, in handle
    pre_migrate_apps = pre_migrate_state.apps
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/utils/functional.py", line 57, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
                                         ^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/db/migrations/state.py", line 566, in apps
    return StateApps(self.real_apps, self.models)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/nautobot/lib/python3.11/site-packages/django/db/migrations/state.py", line 637, in __init__
    raise ValueError("\n".join(error.msg for error in errors))
ValueError: The field nautobot_device_lifecycle_mgmt.ValidatedSoftwareLCM.device_roles was declared with a lazy reference to 'dcim.devicerole', but app 'dcim' doesn't provide model 'devicerole'.
The field nautobot_device_lifecycle_mgmt.ValidatedSoftwareLCM_device_roles.devicerole was declared with a lazy reference to 'dcim.devicerole', but app 'dcim' doesn't provide model 'devicerole'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants