From a3d13fb286c39a2d9195b70e4265e5ac0deb6fd3 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 20 Nov 2019 14:10:48 +0100 Subject: podman {pod,} rm/stop: add --ignore flag Add an --ignore flag to podman rm and stop. When specified, Podman will ignore "no such {container,pod}" errors that occur when a specified container/pod is not present in the store (anymore). The motivation behind adding this flag is to write more robust systemd services using Podman. A user might have manually decided to remove a container/pod which would lead to a failure during the `ExecStop` directive of a systemd service referencing that container/pod. Signed-off-by: Valentin Rothberg --- cmd/podman/cliconfig/config.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmd/podman/cliconfig') diff --git a/cmd/podman/cliconfig/config.go b/cmd/podman/cliconfig/config.go index 745f49651..27d94f769 100644 --- a/cmd/podman/cliconfig/config.go +++ b/cmd/podman/cliconfig/config.go @@ -368,6 +368,7 @@ type PodRestartValues struct { type PodRmValues struct { PodmanCommand All bool + Ignore bool Force bool Latest bool } @@ -389,6 +390,7 @@ type PodStatsValues struct { type PodStopValues struct { PodmanCommand All bool + Ignore bool Latest bool Timeout uint } @@ -484,6 +486,7 @@ type RmValues struct { PodmanCommand All bool Force bool + Ignore bool Latest bool Storage bool Volumes bool @@ -561,6 +564,7 @@ type StatsValues struct { type StopValues struct { PodmanCommand All bool + Ignore bool Latest bool Timeout uint CIDFiles []string -- cgit v1.2.3-54-g00ecf