mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 14:23:02 +02:00
package/execd: clean up any lingering containers at boot
To be able to handle container restarts, incl. restart policy, at runtime, most of the container data lives in /var/lib/containers, which on most systems is backed by a persistent store. As of issue #823 we no longer keep a writable layer for containers, nor should we cache container state across reboots, all containers are recreated at boot. This task cleans up any lingering state. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -273,6 +273,7 @@ commands:
|
||||
create NAME IMAGE NET Create container NAME using IMAGE with networks NET
|
||||
delete [network] NAME Remove container NAME or network NAME from all containers
|
||||
exec NAME CMD Run a command inside a container
|
||||
flush Clean up lingering containers and associated anonymous volumes
|
||||
find [ifname PID] Find PID of container where '--net IFNAME' currently lives
|
||||
or, find the name of our IFNAME inside the container @PID
|
||||
help Show this help text
|
||||
@@ -425,6 +426,10 @@ case $cmd in
|
||||
exec)
|
||||
podman exec -it "$@"
|
||||
;;
|
||||
flush)
|
||||
echo "Cleaning up any lingering containers";
|
||||
podman rm -av
|
||||
;;
|
||||
find)
|
||||
cmd=$1
|
||||
pid=$2
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
task log:prio:local1.notice,tag:container-flush <pid/syslogd> \
|
||||
[S] container flush -- Cleaning up lingering containers
|
||||
service log:prio:local1.err,tag:container \
|
||||
[2345] execd /run/containers/queue /run/containers/active -- Container job runner
|
||||
|
||||
Reference in New Issue
Block a user