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

Fix install awx-task > init-database container if it needs to be stopped by kubernetes #1986

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

JoelKle
Copy link
Contributor

@JoelKle JoelKle commented Oct 30, 2024

SUMMARY

If the database setup is in some way wrong, the wait-for-migrations command inside the init-database container runs infinitely and can't be stopped by kubernetes. The "PID 1" problem.

ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

The wait-for-migrations command needs to be started by dump-init command. The dump-init command is the default ENTRYPOINT of the used container image. See: https://github.com/ansible/awx/blob/devel/tools/ansible/roles/dockerfile/templates/Dockerfile.j2#L321
command: overwrites the ENTRYPOINT, args: append to the ENTRYPOINT

Otherwise the init-database can't be stopped by kubernetes because the PID 1 ignores all SIGTERM / SIGKILL signals.

If the database setup is in some way wrong, the `wait-for-migrations` command inside the `init-database` container runs infinitely and can't be stopped by kubernetes.
The `wait-for-migrations` command needs to be started by `dump-init` command. The `dump-init` command is the default ENTRYPOINT of the used container image.
See: https://github.com/ansible/awx/blob/devel/tools/ansible/roles/dockerfile/templates/Dockerfile.j2#L321
@JoelKle JoelKle changed the title Fix install awx-task init-database container if it needs to be stopped by kubernetes Fix install awx-task > init-database container if it needs to be stopped by kubernetes Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant