Skip to content

Commit 12df83e

Browse files
committed
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 <[email protected]>
1 parent 6b0145f commit 12df83e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Start a container instance (%i) and redirect logs to /log/container
2-
# Give podman enough time to properly shut down the container. Every
3-
# time we start a container we run the setup stage, disable the Finit
4-
# timeout to allow the setup stage to run to completion.
5-
sysv log:prio:local1,tag:%i kill:10 pid:!/run/container:%i.pid \
6-
pre:0,/usr/sbin/container cleanup:0,/usr/sbin/container \
2+
# Give podman enough time to properly shut down the container, kill:30
3+
# The pre:script, which is responsibe for fetching a remote image, must
4+
# not have a timeout. The cleanup should take no longer than a minute.
5+
sysv log:prio:local1,tag:%i kill:30 pid:!/run/container:%i.pid \
6+
pre:0,/usr/sbin/container cleanup:60,/usr/sbin/container \
77
[2345] <!> :%i container -n %i -- container %i

0 commit comments

Comments
 (0)