-
Notifications
You must be signed in to change notification settings - Fork 637
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
Upgraded to 2.13.1 - awx-task pod stuck "Waiting for database migrations..." #1777
Comments
can you test my patch here? |
@fosterseth thanks, I'll try in another environment. On this one, I've ended up in reinstall+restore data from a backup |
I encountered a similar problem: In my case the awx-task pods were stuck in init-container "init-database" with "waiting for migrations".
After checking the awx-operator source code, I think, that removing the "wait" and "wait_timeout" from the task, where the web and task deployments are applied ("Apply deployment resources" in resources_configuration.yml), may cause the problem (Commit ffba1b4, Pull Request #1674). The deployments are applied without waiting for them to be running. In the immediately following task "Get the new resource pod information after updating resource" the playbook tries to get the infos from the web pods but only with "status.phase=Running". As the previous task is not waiting for the pods created by the deployments to be running, the registered _new_pod variable may be empty at this moment. Therefore all the following set_fact tasks may use empty values and therefore the assertion task "Verify the resource pod name is populated" is failing. The playbook then ends at this point and all the following includes like "migrate_schema.yml", "initialize_django.yml" etc. are not executed. |
Please confirm the following
Bug Summary
Hello 👋 , I have upgraded AWX Operator to 2.13.1 using the helm chart but awx-task pod is stuck in "Waiting for database migrations..." phase.
AWX Operator version
2.13.1
AWX version
24.0.0
Kubernetes platform
kubernetes
Kubernetes/Platform version
v1.27.8+k3s2
Modifications
no
Steps to reproduce
I don't have specific steps to reproduce, I have only upgraded from AWX 23.9.0 to 24.0.0 using the helm chart
Expected results
Migration job to complete successful and having AWX instance up&running
Actual results
Actual result is having the awx-task pod stuck in
Init:0/3
state with the logs ofinit-database
container looping:Additional information
Looking at pod status "apparently" the job for migrating the DB did run successful:
But looking at
awx-migration
job logs it seems the migration got somehow finished earlier so it did not complete:This is also confirmed by running
/bin/bash -c "! awx-manage showmigrations | grep '\[ \]'"
insideawx-task
pod (init-database
container)Workaround
Remove the whole
status
block at the bottom of yaml file and removeresourceVersion
,uid
(and any other uids inside the file)Delete currently present job
awx-job.yaml
A new job is getting created and runs, which should complete all the migrations this time
Operator Logs
No response
The text was updated successfully, but these errors were encountered: