Open duggym122 opened 3 days ago
please enable debug and share the tandoor logs from first boot
@smilerz I get a slightly different error about a duplicate RecipeBook this time
Checking configuration...
Waiting for database to be ready...
Database is ready
Migrating database
Operations to perform:
Apply all migrations: account, admin, auth, authtoken, contenttypes, cookbook, oauth2_provider, sessions, sites, socialaccount
Running migrations:
Traceback (most recent call last):
File "/opt/recipes/manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
utility.execute()
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/core/management/commands/migrate.py", line 356, in handle
post_migrate_state = executor.migrate(
^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
state = migration.apply(state, schema_editor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/opt/recipes/venv/lib/python3.12/site-packages/django/db/migrations/operations/special.py", line 193, in database_forwards
self.code(from_state.apps, schema_editor)
File "/opt/recipes/cookbook/migrations/0200_alter_propertytype_options_remove_keyword_icon_and_more.py", line 33, in migrate_icons
raise RuntimeError(f'Duplicate RecipeBook found, please remove/rename them and run migrations again/restart the container. {duplicate_meal_types}')
RuntimeError: Duplicate RecipeBook found, please remove/rename them and run migrations again/restart the container. <QuerySet [{'space_id': 3, 'name': 'Cocktails', 'name_count': 2}]>
Applying cookbook.0200_alter_propertytype_options_remove_keyword_icon_and_more...Generating static files
js-reverse file written to /opt/recipes/cookbook/static/django_js_reverse
1 static file copied to '/opt/recipes/staticfiles', 574 unmodified, 1185 post-processed.
Done
[2024-07-02 15:21:30 +0000] [1] [INFO] Starting gunicorn 21.2.0
[2024-07-02 15:21:30 +0000] [1] [INFO] Listening at: http://[::]:8080 (1)
[2024-07-02 15:21:30 +0000] [1] [INFO] Using worker: gthread
[2024-07-02 15:21:30 +0000] [17] [INFO] Booting worker with pid: 17
[2024-07-02 15:21:31 +0000] [18] [INFO] Booting worker with pid: 18
[2024-07-02 15:21:31 +0000] [19] [INFO] Booting worker with pid: 19
Duplicate RecipeBook found
@smilerz this really isn't advice, just quoting my own message back to me - how do I fix it if it's not true? And/or what debugging tool/ui do I use to figure it out?
@smilerz this really isn't advice, just quoting my own message back to me - how do I fix it if it's not true? And/or what debugging tool/ui do I use to figure it out?
you need to go into the database, find the duplicate name and delete it.
Alternatively, return the state to a prior working version and find the duplicate recipe book and delete it from the Tandoor UI
you need to go into the database, find the duplicate name and delete it.
Can do, but I'm hoping I can try your other suggestion first, just to avoid a total clustertruck in the event I botch it. Luckily I work with a few former and current DBAs who I might be able to call in for a favor.
Alternatively, return the state to a prior working version and find the duplicate recipe book and delete it from the Tandoor UI
I tried to find documentation of version compatibility, but got lost - any idea what Tandoor version last supported postgres 11 by any chance? I figured this would work, but I couldn't seem to go back far enough in the tags.
Unfortunately, it would have to be the exact version that you had installed previously.
Issue
I upgraded from postgres 11 to postgres 16 successfully, tested using a blank db before clearing the db, letting postgres 16 set it up empty, and then loading in the old postgres 11 dump, all per the Thomas Brandt guide.
After importing, restarting the db container, then allowing the tandoor container to start and perform its migration steps, it shows a "Programming Error" screen with the following key points (full traceback below that)
Tandoor Version
Can't see the version, docker hash as follows: sha256:177a634dc07d0b94013dd94c98174836fa00e8513829fd47467e725964857126
OS Version
Synology DSM 7.1.1-42962
Setup
Docker / Docker-Compose
Reverse Proxy
Nginx Proxy Manager (NPM)
Other
Portainer-managed docker
Environment file
Docker-Compose file
Relevant logs
No response