3.0.6 - upgrade.sh broken, django.db.migrations.exceptions.NodeNotFoundError #7508
Unanswered
JCrabtree911
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Okay... closed why? There appears to be a file missing from the migrations. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox version
v3.0.6
Python version
3.7
Steps to Reproduce
Upgrading FROM 2.8.5 TO 3.0.6, everything is has been unzipped, symlinked, and copied to the appropriate place.
cd /opt/netbox
PYTHON=/usr/bin/python3.7 ./upgrade.sh
Expected Behavior
Upgrade.sh should run successfully.
Observed Behavior
The migration process throws the exception django.db.migrations.exceptions.NodeNotFoundError verbose output is below. It looks like 0131_consoleport_speed.py depends on 0130_sitegroup which doesn't exist
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/loader.py", line 259, in build_graph
self.graph.validate_consistency()
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/graph.py", line 195, in validate_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/graph.py", line 195, in
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/graph.py", line 58, in raise_error
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed dependencies reference nonexistent parent node ('dcim', '0130_sitegroup')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "netbox/manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/init.py", line 419, in execute_from_command_line
utility.execute()
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/init.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/core/management/commands/migrate.py", line 92, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/executor.py", line 18, in init
self.loader = MigrationLoader(self.connection)
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/loader.py", line 53, in init
self.build_graph()
File "/opt/netbox-3.0.6/venv/lib/python3.7/site-packages/django/db/migrations/loader.py", line 284, in build_graph
) from exc
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed depends on nonexistent node ('dcim', '0130_sitegroup'). Django tried to replace migration dcim.0130_sitegroup with any of [dcim.0003_squashed_0130] but wasn't able to because some of the replaced migrations are already applied.
/opt/netbox# cd netbox/dcim/migrations/
/opt/netbox/netbox/dcim/migrations# ls
0001_squashed.py 0002_squashed.py 0003_squashed_0130.py 0131_consoleport_speed.py 0132_cable_length.py 0133_port_colors.py init.py pycache
/opt/netbox/netbox/dcim/migrations#
Beta Was this translation helpful? Give feedback.
All reactions