Skip to content

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.

@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
Copy link
Contributor Author

JoelKle commented Apr 14, 2025

@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