-
Notifications
You must be signed in to change notification settings - Fork 638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when upgrading awx-operator from 2.1.0 to 2.2.0 #1673
Comments
Hello @racheldaguenethahn, we've had several fixes around similar issues. Are you able to upgrade to the latest version? |
Hi @jessicamack , thank you for your answer. |
you should be able to upgrade from 2.1.0 to 2.10.0 |
Hi, I upgraded awx-operator from 2.1.0 to 2.10.0. From awx-web pod I can see the following error
|
The migrations_notrans URL is served when migrations haven't finished. This is usually because migrations are in progress but have not finished, however, if migrations error then it'll also serve that page. Can you provide the logs from the awx-task and postgres containers as well? |
@racheldaguenethahn I have the same issue, in my case pod |
@jessicamack I cannot provide you the logs from my production environment as I reverted to version 2.1.0. However, I deployed another awx-operator 2.1.0 + awx instance into a sandbox cluster. This instance uses an unmanaged postgresql DB containing a backup of the production environment. Find in attachment the logs of the postgres13 pod. The logs from awx-task pod are not very useful...
|
@khorn7sk yes the awx-task pod is up and running but waiting for the DB migration |
Hi, I saw that there was a new version for awx-operator. It still fails on the DB with the following issues ` ` |
Hello, I still have this issue. Going into the awx-web pod to run awx-manage command line I have the same issue: bash-5.1$ awx-manage showmigrations Only 0184_django_indexes is failing bash-5.1$ awx-manage migrate main Any ideas? |
Please confirm the following
Bug Summary
Hi,
I'm unable to upgrade AWX instance due to an issue on the migration of the managed postgresql DB.
Something is wrong into the main_projectupdateevent table.
Does someone know how to solve this? Table entries to delete?
Logs from the awx-manager container of awx-operator 2.2.0 pod:
Thank in advance
Rachel
AWX Operator version
2.1.0
AWX version
22.2.0
Kubernetes platform
openshift
Kubernetes/Platform version
4.12.37
Modifications
no
Steps to reproduce
helm pull awx-operator/awx-operator --version 2.2.0
tar -zxf awx-operator-2.2.0.tgz
kubectl apply -f awx-operator ./awx-operator/crds/customresourcedefinition-awxbackups.awx.ansible.com.yaml
kubectl apply -f awx-operator ./awx-operator/crds/customresourcedefinition-awxrestores.awx.ansible.com.yaml
kubectl apply -f awx-operator ./awx-operator/crds/customresourcedefinition-awxs.awx.ansible.com.yaml
helm upgrade --install awx-operator ./awx-operator
Expected results
awx-operator is upgraded successfully
AWX instance is upgraded successfully
Actual results
awx-operator is upgraded
AWX instance is waiting for database migration
The following errors appears into awx-operator/awx-manager container
`
TASK [Migrate the database if the K8s resources were updated.] ********************************
fatal: [localhost]: FAILED! => {"changed": true, "rc": 1, "return_code": 1, "stderr": "Traceback (most recent call last):
File "/usr/bin/awx-manage", line 8, in
sys.exit(manage())
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/init.py", line 200, in manage
execute_from_command_line(sys.argv)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 442, in execute_from_command_line
utility.execute()
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/commands/migrate.py", line 356, in handle
post_migrate_state = executor.migrate(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 135, in migrate
state = self._migrate_all_forwards(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards
state = self.apply_migration(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 252, in apply_migration
state = migration.apply(state, schema_editor)
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/migration.py", line 132, in apply
operation.database_forwards(
File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/operations/models.py", line 977, in database_forwards
raise ValueError(\nValueError: Found wrong number (0) of indexes for main_projectupdateevent(project_update_id, job_created, uuid).\n", "stderr_lines": ["Traceback (most recent call last):", " File "/usr/bin/awx-manage", line 8, in ", " sys.exit(manage())", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/init.py", line 200, in manage", " execute_from_command_line(sys.argv)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 442, in execute_from_command_line", " utility.execute()", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py", line 436, in execute", " self.fetch_command(subcommand).run_from_argv(self.argv)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 412, in run_from_argv", " self.execute(*args, **cmd_options)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 458, in execute", " output = self.handle(*args, **options)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py", line 106, in wrapper", " res = handle_func(*args, **kwargs)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/commands/migrate.py", line 356, in handle", " post_migrate_state = executor.migrate(", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 135, in migrate", " state = self._migrate_all_forwards(", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 167, in _migrate_all_forwards", " state = self.apply_migration(", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py", line 252, in apply_migration", " state = migration.apply(state, schema_editor)", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/migration.py", line 132, in apply", " operation.database_forwards(", " File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/operations/models.py", line 977, in database_forwards", " raise ValueError(", "ValueError: Found wrong number (0) of indexes for main_projectupdateevent(project_update_id, job_created, uuid)."], "stdout": "Operations to perform:
Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit\nRunning migrations:
Applying main.0184_django_indexes...", "stdout_lines": ["Operations to perform:", " Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit", "Running migrations:", " Applying main.0184_django_indexes..."]}
`
Additional information
No response
Operator Logs
No response
The text was updated successfully, but these errors were encountered: