Upgrade on digital ocean droplet failing #6553

Closed
opened 2025-12-29 19:42:16 +01:00 by adam · 1 comment
Owner

Originally created by @scfigg on GitHub (Jun 9, 2022).

NetBox version

2.10.4

Python version

3.8

Steps to Reproduce

cd /opt/netbox
sudo git pull origin master
sudo upgrade.sh

Expected Behavior

Created a new droplet on digital ocean, and then followed their commands to upgrade netbox. Ended up failing during the database migration.

Observed Behavior

`Skipping local dependencies (local_requirements.txt not found)
Applying database migrations (python3 netbox/manage.py migrate)...
Traceback (most recent call last):
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 276, in build _graph
self.graph.validate_consistency()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in valida te_consistency
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in
[n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)]
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 60, in raise_e rror
raise NodeNotFoundError(self.error_message, self.key, origin=self.origin)
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed dependencies re ference 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/venv/lib/python3.8/site-packages/django/core/management/init.py", line 446, in e xecute_from_command_line
utility.execute()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/init.py", line 440, in e xecute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_f rom_argv
self.execute(*args, **cmd_options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execu te
output = self.handle(*args, **options)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 98, in wrappe d
res = handle_func(*args, **kwargs)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 1 08, in handle
executor = MigrationExecutor(connection, self.migration_progress_callback)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in in it
self.loader = MigrationLoader(self.connection)
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 58, in __init __
self.build_graph()
File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 295, in build _graph
raise NodeNotFoundError(
django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed depends on none xistent 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 appl ied.
`

`Server Error
A database programming error was detected while processing this request. Common causes include the following:

Database migrations missing - When upgrading to a new NetBox release, the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing python3 manage.py migrate from the command line.

Unsupported PostgreSQL version - Ensure that PostgreSQL version 10 or later is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query for SELECT VERSION().
-----------------------------------------------------------
The complete exception is provided below:

<class 'django.db.utils.ProgrammingError'>

column extras_customfield.created does not exist
LINE 1: SELECT "extras_customfield"."id", "extras_customfield"."crea...
                                          ^


Python version: 3.8.10
NetBox version: 3.2.4
If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub.

[Home Page](https://159.89.86.243/)`
Originally created by @scfigg on GitHub (Jun 9, 2022). ### NetBox version 2.10.4 ### Python version 3.8 ### Steps to Reproduce cd /opt/netbox sudo git pull origin master sudo upgrade.sh ### Expected Behavior Created a new droplet on digital ocean, and then followed their commands to upgrade netbox. Ended up failing during the database migration. ### Observed Behavior `Skipping local dependencies (local_requirements.txt not found) Applying database migrations (python3 netbox/manage.py migrate)... Traceback (most recent call last): File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 276, in build _graph self.graph.validate_consistency() File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in valida te_consistency [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 198, in <listc omp> [n.raise_error() for n in self.node_map.values() if isinstance(n, DummyNode)] File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/graph.py", line 60, in raise_e rror raise NodeNotFoundError(self.error_message, self.key, origin=self.origin) django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed dependencies re ference 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 <module> execute_from_command_line(sys.argv) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 446, in e xecute_from_command_line utility.execute() File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 440, in e xecute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 414, in run_f rom_argv self.execute(*args, **cmd_options) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 460, in execu te output = self.handle(*args, **options) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/base.py", line 98, in wrappe d res = handle_func(*args, **kwargs) File "/opt/netbox/venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 1 08, in handle executor = MigrationExecutor(connection, self.migration_progress_callback) File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __in it__ self.loader = MigrationLoader(self.connection) File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 58, in __init __ self.build_graph() File "/opt/netbox/venv/lib/python3.8/site-packages/django/db/migrations/loader.py", line 295, in build _graph raise NodeNotFoundError( django.db.migrations.exceptions.NodeNotFoundError: Migration dcim.0131_consoleport_speed depends on none xistent 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 appl ied. ` ``` `Server Error A database programming error was detected while processing this request. Common causes include the following: Database migrations missing - When upgrading to a new NetBox release, the upgrade script must be run to apply any new database migrations. You can run migrations manually by executing python3 manage.py migrate from the command line. Unsupported PostgreSQL version - Ensure that PostgreSQL version 10 or later is in use. You can check this by connecting to the database using NetBox's credentials and issuing a query for SELECT VERSION(). ----------------------------------------------------------- The complete exception is provided below: <class 'django.db.utils.ProgrammingError'> column extras_customfield.created does not exist LINE 1: SELECT "extras_customfield"."id", "extras_customfield"."crea... ^ Python version: 3.8.10 NetBox version: 3.2.4 If further assistance is required, please post to the [NetBox discussion forum](https://github.com/netbox-community/netbox/discussions) on GitHub. [Home Page](https://159.89.86.243/)` ```
adam closed this issue 2025-12-29 19:42:17 +01:00
Author
Owner

@scfigg commented on GitHub (Jun 9, 2022):

I luckily took a snapshot prior to upgrading, so I restored that. Just not sure of how to upgrade to 3.x now that it's failing.

@scfigg commented on GitHub (Jun 9, 2022): I luckily took a snapshot prior to upgrading, so I restored that. Just not sure of how to upgrade to 3.x now that it's failing.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6553