When the 389-ds container is running and docker stop or podman stop is issued the container gets killed after the default 10sec timeout instead of performing a graceful shutdown. Exit code is then 137. Logs do not mention a shutdown of the 389 instance.
docker stop
podman stop
137
When running the container with a teminal attached and issuing Ctrl+C does start a graceful shutdown.
Ctrl+C
Examining /usr/lib/dirsrv/dscontainer learns me that it will only start a graceful shutdown on a KeyboardInterrupt Exception. But podman stop sends a SIGTERM which is ignored by dscontainer. podman kill --signal=SIGINT indead makes the container shutdown gracefully with an exit code 0 and mentions the shutdown in the logs.
/usr/lib/dirsrv/dscontainer
dscontainer
podman kill --signal=SIGINT
0
podman stop dirsrv
command takes 10 sec to stop the container. Exit code is 137 Last line in log:
INFO: 389-ds-container started.
container stops almost immediatly. Exit code is 0. Last line in log:
INFO: STOPPING: Shutting down 389-ds-container ...
It would appear the container definition doesn't have the correct signal handler set in the dockerfile. I will ammend that now.
Metadata Update from @firstyear: - Custom field origin adjusted to None - Custom field reviewstatus adjusted to None
Interesting, we should be trapping sigterm anyway ... so maybe more investigation is needed.
https://pagure.io/389-ds-base/pull-request/51084#
Thanks! I tested your changed version of dscontainer and the container now stops gracefully.
Metadata Update from @mreynolds: - Issue priority set to: normal - Issue set to the milestone: 1.4.2
Metadata Update from @firstyear: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
I'll be backporting these and releasing updated containers related soon.
389-ds-base is moving from Pagure to Github. This means that new issues and pull requests will be accepted only in 389-ds-base's github repository.
This issue has been cloned to Github and is available here: - https://github.com/389ds/389-ds-base/issues/4133
If you want to receive further updates on the issue, please navigate to the github issue and click on subscribe button.
subscribe
Thank you for understanding. We apologize for all inconvenience.
Metadata Update from @spichugi: - Issue close_status updated to: wontfix (was: fixed)
Login to comment on this ticket.