summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2020-06-05 16:09:26 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-06-05 16:18:53 -0400
commit1cc9731dfad9ec06ab162ce432c82ec4d675e60e (patch)
treec082c765c3463f53d80b729de596266e5f24301f /cmd/podman
parent723e8234393fba230961bc1214a73ba5d01bbfe1 (diff)
downloadpodman-1cc9731dfad9ec06ab162ce432c82ec4d675e60e.tar.gz
podman-1cc9731dfad9ec06ab162ce432c82ec4d675e60e.tar.bz2
podman-1cc9731dfad9ec06ab162ce432c82ec4d675e60e.zip
Add parallel operation to `podman stop`
This is the other command that benefits greatly from being run in parallel, due to the potential 15-second timeout for containers that ignore SIGTERM. While we're at it, also clean up how stop timeout is set. This needs to be an optional parameter, so that the value set when the container is created with `--stop-timeout` will be respected. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/stop.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/podman/containers/stop.go b/cmd/podman/containers/stop.go
index 22c487961..0f2a91af0 100644
--- a/cmd/podman/containers/stop.go
+++ b/cmd/podman/containers/stop.go
@@ -85,9 +85,8 @@ func stop(cmd *cobra.Command, args []string) error {
var (
errs utils.OutputErrors
)
- stopOptions.Timeout = containerConfig.Engine.StopTimeout
if cmd.Flag("time").Changed {
- stopOptions.Timeout = stopTimeout
+ stopOptions.Timeout = &stopTimeout
}
responses, err := registry.ContainerEngine().ContainerStop(context.Background(), args, stopOptions)