diff options
author | Emilien Macchi <emilien@redhat.com> | 2018-09-17 18:32:11 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-09-18 12:24:39 +0000 |
commit | 0b2cfa7fcf479a26245ade0490fdfbecc973d9bb (patch) | |
tree | 78f136ba3959dcafea58519e97a815b14dba27dd /libpod/container_api.go | |
parent | e4770b82895659278b67a1bddb1a5acd8d785f59 (diff) | |
download | podman-0b2cfa7fcf479a26245ade0490fdfbecc973d9bb.tar.gz podman-0b2cfa7fcf479a26245ade0490fdfbecc973d9bb.tar.bz2 podman-0b2cfa7fcf479a26245ade0490fdfbecc973d9bb.zip |
Increase pidWaitTimeout to 1000ms
When managing the containers with systemd, it takes a bit more than
250ms to have podman creating the pidfile.
Increasing the value to 1 second will avoid timeout issues when running
a lot of containers managed by systemd.
This patch was tested in a VM with 56 services (OpenStack) deployed by
TripleO and managed by systemd.
Fixes #1495
Signed-off-by: Emilien Macchi <emilien@redhat.com>
Closes: #1497
Approved by: rhatdan
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r-- | libpod/container_api.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go index 437699bae..76537ebc4 100644 --- a/libpod/container_api.go +++ b/libpod/container_api.go @@ -339,7 +339,9 @@ func (c *Container) Exec(tty, privileged bool, env, cmd []string, user string) e } pidFile := c.execPidPath(sessionID) - const pidWaitTimeout = 250 + // 1 second seems a reasonable time to wait + // See https://github.com/containers/libpod/issues/1495 + const pidWaitTimeout = 1000 // Wait until the runtime makes the pidfile // TODO: If runtime errors before the PID file is created, we have to |