summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2019-04-23 12:37:17 -0400
committerMatthew Heon <mheon@redhat.com>2019-04-24 12:51:41 -0400
commit4f69c07996dc3c16b39aa2f97904370d2b9a38ab (patch)
tree1d633b95274e2309e5672db93d18476a1379a848 /pkg
parentb4cba6090d2e44f34f233bee4f2df47582ced7a0 (diff)
downloadpodman-4f69c07996dc3c16b39aa2f97904370d2b9a38ab.tar.gz
podman-4f69c07996dc3c16b39aa2f97904370d2b9a38ab.tar.bz2
podman-4f69c07996dc3c16b39aa2f97904370d2b9a38ab.zip
Fix podman stop --all attempting to stop created ctrs
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/adapter/containers.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 5279f11b2..a5b911da1 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -92,6 +92,9 @@ func (r *LocalRuntime) StopContainers(ctx context.Context, cli *cliconfig.StopVa
if errors.Cause(err) == libpod.ErrCtrStopped {
logrus.Debugf("Container %s is already stopped", c.ID())
return nil
+ } else if cli.All && errors.Cause(err) == libpod.ErrCtrStateInvalid {
+ logrus.Debugf("Container %s is not running, could not stop", c.ID())
+ return nil
}
logrus.Debugf("Failed to stop container %s: %s", c.ID(), err.Error())
}