summaryrefslogtreecommitdiff
path: root/pkg/adapter/containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-24 11:33:38 -0700
committerGitHub <noreply@github.com>2019-04-24 11:33:38 -0700
commit730309cb42d0ecf452d64261899ad29886eb4350 (patch)
treec1c341580f58fd7ee1f22f900abb840831c7960d /pkg/adapter/containers.go
parentb4cba6090d2e44f34f233bee4f2df47582ced7a0 (diff)
parent90873b465b187e995bc3a436ef5fb1dc8072f8b9 (diff)
downloadpodman-730309cb42d0ecf452d64261899ad29886eb4350.tar.gz
podman-730309cb42d0ecf452d64261899ad29886eb4350.tar.bz2
podman-730309cb42d0ecf452d64261899ad29886eb4350.zip
Merge pull request #2994 from mheon/fix_podman_stop_all
Fix podman stop --all attempting to stop created ctrs
Diffstat (limited to 'pkg/adapter/containers.go')
-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())
}