From 0b2cfa7fcf479a26245ade0490fdfbecc973d9bb Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 17 Sep 2018 18:32:11 -0400 Subject: 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 Closes: #1497 Approved by: rhatdan --- libpod/container_api.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-54-g00ecf