Skip to content
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

Wait for the postgres pod to enter the ready state before continuing #861

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

rooftopcellist
Copy link
Member

We added an initContainer for the postgres pod to help with an upgrade bug. Unfortunately the initContainer makes the postgres pod take longer to initialize. As a result, is some scenarios, it is possible that the postgres pod will not be up by the time the web and task containers come online.

The symptoms of this bug are that the containers appear to be running, but requests in the browser to the UI return 404's. This is because the launch_awx.sh entrypoint script which copies over the static files for nginx fails before it gets to that step because it cannot reach the database. Unfortunately, it does not recover and the user must manually scale their deployment to 0, and back up to 1 to resolve the issue.

This patch waits until the postgres pod is in the "ready" state before proceeding and applying the deployment config (which starts the containers).

@rooftopcellist
Copy link
Member Author

I tested this out and it appears to solve the problem, and no regressions on fresh deployments. The folks who raised the issue tested it out in their environment and it worked there as well.

Copy link
Member

@shanemcd shanemcd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@rooftopcellist rooftopcellist merged commit 575e594 into ansible:devel Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants