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
This commit is contained in:
Emilien Macchi
2018-09-17 18:32:11 -04:00
committed by Atomic Bot
parent e4770b8289
commit 0b2cfa7fcf

View File

@ -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