diff options
author | baude <bbaude@redhat.com> | 2018-11-07 13:20:43 -0600 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2018-11-08 15:18:11 -0600 |
commit | 2dd9cae37cb076418393ba61c0fb7b8cf97148f3 (patch) | |
tree | 346e95940f263a5ea770be6f11ebe4130e8e626b /cmd/podman/restart.go | |
parent | fa8cc1a94281aac1c52952a002f9c3dd31d91197 (diff) | |
download | podman-2dd9cae37cb076418393ba61c0fb7b8cf97148f3.tar.gz podman-2dd9cae37cb076418393ba61c0fb7b8cf97148f3.tar.bz2 podman-2dd9cae37cb076418393ba61c0fb7b8cf97148f3.zip |
rm -f now removes a paused container
We now can remove a paused container by sending it a kill signal while it
is paused. We then unpause the container and it is immediately killed.
Also, reworked how the parallelWorker results are handled to provide a
more consistent approach to how each subcommand implements it. It also
fixes a bug where if one container errors, the error message is duplicated
when printed out.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podman/restart.go')
-rw-r--r-- | cmd/podman/restart.go | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/cmd/podman/restart.go b/cmd/podman/restart.go index 2e264db79..630493ef4 100644 --- a/cmd/podman/restart.go +++ b/cmd/podman/restart.go @@ -1,8 +1,6 @@ package main import ( - "fmt" - "github.com/containers/libpod/cmd/podman/libpodruntime" "github.com/containers/libpod/cmd/podman/shared" "github.com/containers/libpod/libpod" @@ -46,7 +44,6 @@ func restartCmd(c *cli.Context) error { var ( restartFuncs []shared.ParallelWorkerInput containers []*libpod.Container - lastError error restartContainers []*libpod.Container ) @@ -124,15 +121,6 @@ func restartCmd(c *cli.Context) error { logrus.Debugf("Setting maximum workers to %d", maxWorkers) - restartErrors := shared.ParallelExecuteWorkerPool(maxWorkers, restartFuncs) - - for cid, result := range restartErrors { - if result != nil { - fmt.Println(result.Error()) - lastError = result - continue - } - fmt.Println(cid) - } - return lastError + restartErrors, errCount := shared.ParallelExecuteWorkerPool(maxWorkers, restartFuncs) + return printParallelOutput(restartErrors, errCount) } |