Operations to perform:
Apply all migrations: account, admin, auth, circuits, contenttypes, core, dcim, django_rq, extras, ipam, sessions, social_django, taggit, tenancy, users, virtualization, vpn, wireless
Running migrations:
Applying tenancy.0002_tenant_ordering... OK
Applying extras.0062_clear_secrets_changelog...Skipping config initialization (database unavailable)
Traceback (most recent call last):
File "/opt/netbox-3.7.2/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/opt/netbox-3.7.2/venv/lib/python3.10/site-packages/psycopg/cursor.py", line 732, in execute
raise ex.with_traceback(None)
psycopg.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
Postgres logged the following:
2024-02-10_19:40:19.45436 ERROR: relation "core_configrevision" does not exist at character 136
2024-02-10_19:40:19.45440 STATEMENT: SELECT "core_configrevision"."id", "core_configrevision"."created", "core_configrevision"."comment", "core_configrevision"."data" FROM "core_configrevision" ORDER BY "core_configrevision"."created" ASC LIMIT 1
2024-02-10_19:40:19.45548 ERROR: current transaction is aborted, commands ignored until end of transaction block
2024-02-10_19:40:19.45549 STATEMENT: DELETE FROM "extras_objectchange" WHERE "extras_objectchange"."id" IN (100, 99, 98, 97, 96)
executing python3 netbox/manage.py migrate extras 0102_move_configrevision does not solve the problem
(venv) root@sodium:/opt/netbox-3.7.2# python3 netbox/manage.py migrate extras 0102_move_configrevision
Operations to perform:
Target specific migration: 0102_move_configrevision, from extras
Running migrations:
Applying extras.0062_clear_secrets_changelog...Skipping config initialization (database unavailable)
Traceback (most recent call last):
File "/opt/netbox-3.7.2/venv/lib/python3.10/site-packages/django/db/backends/utils.py", line 89, in _execute
return self.cursor.execute(sql, params)
File "/opt/netbox-3.7.2/venv/lib/python3.10/site-packages/psycopg/cursor.py", line 732, in execute
raise ex.with_traceback(None)
psycopg.errors.InFailedSqlTransaction: current transaction is aborted, commands ignored until end of transaction block
output of showmigrations if this can help diagnose :
Hello,
I have slightly the same problem when trying to upgrade from 3.0.0 to 3.7.2 than in https://github.com/netbox-community/netbox/discussions/14678 :
Postgres logged the following:
executing
python3 netbox/manage.py migrate extras 0102_move_configrevision
does not solve the problemoutput of
showmigrations
if this can help diagnose :Any idea what could cause that ?
Thanks for your help !
Originally posted by @jtraulle in https://github.com/netbox-community/netbox/discussions/14678#discussioncomment-8429357