summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-11-28 07:39:37 -0800
committerGitHub <noreply@github.com>2018-11-28 07:39:37 -0800
commit7ae37dcafced4da7fd1e65e6ec41a07220c06542 (patch)
tree78299fb76387567657447da2999f127e46a4b82f /cmd
parenteffd63d6d5c2541f09745261a1e9205fa531e526 (diff)
parent841f47d728fd1049456012a03b9b4e66407f9489 (diff)
downloadpodman-7ae37dcafced4da7fd1e65e6ec41a07220c06542.tar.gz
podman-7ae37dcafced4da7fd1e65e6ec41a07220c06542.tar.bz2
podman-7ae37dcafced4da7fd1e65e6ec41a07220c06542.zip
Merge pull request #1879 from mheon/stop_stopped_is_valid
Stopping a stopped container is not an error for Podman
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(),