Merge pull request #1879 from mheon/stop_stopped_is_valid

Stopping a stopped container is not an error for Podman
This commit is contained in:
OpenShift Merge Robot
2018-11-28 07:39:37 -08:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -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(),