Skip to content

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

Open
JoelKle wants to merge 1 commit into
ansible:develfrom
JoelKle:patch-1
Open

Fix install awx-task > init-database container if it needs to be stopped by kubernetes#1986
JoelKle wants to merge 1 commit into
ansible:develfrom
JoelKle:patch-1

Conversation

@JoelKle

@JoelKle JoelKle commented Oct 30, 2024

Copy link
Copy Markdown
Contributor
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.

@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
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 commented Apr 14, 2025

Copy link
Copy Markdown
Contributor Author

@rooftopcellist
Could you take a look on this PR?
Thanks

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