Error upgrading from 4.0.11 to 4.1.0 #17388
Replies: 6 comments 8 replies
-
Hello, had they exactly same problem as you. Also the suggestion from #11811 and #17382 did not help. Did a dump from PostgreSQL 16.3 and a fresh install on Ubuntu 24.04.1 LTS and PostgreSQL 16.4. The backup import into the new PostgreSQL netbox database was smooth. |
Beta Was this translation helpful? Give feedback.
-
Full log with this error from postgresql side - #17382 (reply in thread) |
Beta Was this translation helpful? Give feedback.
-
Rised an issue #17401, everyone please check in there. |
Beta Was this translation helpful? Give feedback.
-
It seems the failing migration extras.0117_move_objectchange fails, if core.0011_move_objectchange is not executed in the same run. Try
The 0011_move_objectchange is a state only migration that does not change anything in the database. On the first run there was a permission problem on the database, which caused extras.0117_move_objectchange to fail, but core.0011_move_objectchange was executed and recorded in the migrations table, because it does not change the database structure. |
Beta Was this translation helpful? Give feedback.
-
@amhn After:
I saw in log another error about redis cache:
and this errors from redis and redis-cache containers:
After purge volumes from this containers and and re-removal 0011_move_objectchange from django_migrations netbox is up and running:
Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
I was able to upgrade to 4.1.1 from 4.0.10 in the following way: (FYI I always snapshot my VM prior to upgrades, so I can just roll back if it fails. The presumption is that each attempt is from a current working state, not a broken upgrade) If I attempted the upgrade as documented, I got the error: psycopg.errors.InsufficientPrivilege: permission denied for schema public I was not able to proceed in any manner from this point. After a rollback, before sudo git pull origin master :
Then proceed as normal and the upgrade completed successfully. I don't know why permissions on the database was suddenly a problem, but if the permissions weren't fixed prior to running upgrade.sh, the whole thing was broken beyond my ability to repair. |
Beta Was this translation helpful? Give feedback.
-
Stock install and never had issues with previous upgrades. Upgrade to 4.1.0 fails at database migration. I don't think I have any plugins or extras, and no customizations, let alone ones that would have affected DB access privileges.
Followed suggestion from this thread from last year
Re-running upgrade still fails, but differently:
Beta Was this translation helpful? Give feedback.
All reactions