mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
board/common: allow containers to shut down properly
The extended kill delay (10 sec) is sometimes not enough for complex system containers. Also, podman sometimes take the opportunity to do housekeeping tasks when stopping a container. So, allow for up to 30 sec. grace period before we send SIGKILL. With the latest image prune extension, set a 60 sec. timeout for the cleanup task, in case podman gets stuck. This to prevent any future mishaps. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Start a container instance (%i) and redirect logs to /log/container
|
||||
# Give podman enough time to properly shut down the container. Every
|
||||
# time we start a container we run the setup stage, disable the Finit
|
||||
# timeout to allow the setup stage to run to completion.
|
||||
sysv log:prio:local1,tag:%i kill:10 pid:!/run/container:%i.pid \
|
||||
pre:0,/usr/sbin/container cleanup:0,/usr/sbin/container \
|
||||
# Give podman enough time to properly shut down the container, kill:30
|
||||
# The pre:script, which is responsibe for fetching a remote image, must
|
||||
# not have a timeout. The cleanup should take no longer than a minute.
|
||||
sysv log:prio:local1,tag:%i kill:30 pid:!/run/container:%i.pid \
|
||||
pre:0,/usr/sbin/container cleanup:60,/usr/sbin/container \
|
||||
[2345] <!> :%i container -n %i -- container %i
|
||||
|
||||
Reference in New Issue
Block a user