summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-31 16:32:59 +0200
committerGitHub <noreply@github.com>2020-03-31 16:32:59 +0200
commit4e3010d4e761fcb3d6de3b38cac1dc5b4371b129 (patch)
tree5f5a6a305536a7fa0c67cb3e10cd91da5c997223 /pkg
parent7d4ab3fd8f48c7ded1a226f148e3677a1122c657 (diff)
parent3449b27cd1743a1353ea8c4503eec5d126d04b0d (diff)
downloadpodman-4e3010d4e761fcb3d6de3b38cac1dc5b4371b129.tar.gz
podman-4e3010d4e761fcb3d6de3b38cac1dc5b4371b129.tar.bz2
podman-4e3010d4e761fcb3d6de3b38cac1dc5b4371b129.zip
Merge pull request #5681 from rhatdan/timeout
Switch to using --time as opposed to --timeout to better match Docker.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/adapter/containers.go4
-rw-r--r--pkg/systemd/generate/systemdgen.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index a2f73307b..c395ffc7f 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -1213,8 +1213,8 @@ func (r *LocalRuntime) generateSystemdgenContainerInfo(c *cliconfig.GenerateSyst
return nil, false, err
}
- timeout := int(ctr.StopTimeout())
- if c.StopTimeout >= 0 {
+ timeout := ctr.StopTimeout()
+ if c.Flags().Changed("timeout") || c.Flags().Changed("time") {
timeout = c.StopTimeout
}
diff --git a/pkg/systemd/generate/systemdgen.go b/pkg/systemd/generate/systemdgen.go
index eb15d4927..73fe52c0e 100644
--- a/pkg/systemd/generate/systemdgen.go
+++ b/pkg/systemd/generate/systemdgen.go
@@ -31,7 +31,7 @@ type ContainerInfo struct {
InfraContainer string
// StopTimeout sets the timeout Podman waits before killing the container
// during service stop.
- StopTimeout int
+ StopTimeout uint
// RestartPolicy of the systemd unit (e.g., no, on-failure, always).
RestartPolicy string
// PIDFile of the service. Required for forking services. Must point to the