From 1cc9731dfad9ec06ab162ce432c82ec4d675e60e Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 5 Jun 2020 16:09:26 -0400 Subject: 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 --- cmd/podman/containers/stop.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'cmd/podman') 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) -- cgit v1.2.3-54-g00ecf