summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-11-27 10:23:10 -0500
committerMatthew Heon <matthew.heon@gmail.com>2018-11-28 09:35:30 -0500
commitfc774ac0e5f6b906484723c600f43a66516a208a (patch)
tree40b8a624e3f646ec9cb0bef8e1d14988feacbfb3 /cmd
parentd346996e1512ef6efb3800d6cb762d0409d12459 (diff)
downloadpodman-fc774ac0e5f6b906484723c600f43a66516a208a.tar.gz
podman-fc774ac0e5f6b906484723c600f43a66516a208a.tar.bz2
podman-fc774ac0e5f6b906484723c600f43a66516a208a.zip
Stopping a stopped container is not an error for Podman
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/stop.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/stop.go b/cmd/podman/stop.go
index 04022839a..ade51705e 100644
--- a/cmd/podman/stop.go
+++ b/cmd/podman/stop.go
@@ -2,6 +2,7 @@ package main
import (
"fmt"
+
"github.com/containers/libpod/cmd/podman/libpodruntime"
"github.com/containers/libpod/cmd/podman/shared"
"github.com/containers/libpod/libpod"
@@ -77,7 +78,11 @@ func stopCmd(c *cli.Context) error {
stopTimeout = ctr.StopTimeout()
}
f := func() error {
- return con.StopWithTimeout(stopTimeout)
+ if err := con.StopWithTimeout(stopTimeout); err != nil && errors.Cause(err) != libpod.ErrCtrStopped {
+ return err
+ }
+ return nil
+
}
stopFuncs = append(stopFuncs, shared.ParallelWorkerInput{
ContainerID: con.ID(),