From 42a99d79e993e9782e7e85c89716a232019688d6 Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 29 Jun 2017 09:32:57 -0600 Subject: [PATCH] When bootstrapping teuthology, avoid deadlocks Use Popen.communicate() instead of Popen.wait() Signed-off-by: Zack Cerza --- teuthology/repo_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index fee402e744..a0da17f6d5 100644 --- a/teuthology/repo_utils.py +++ b/teuthology/repo_utils.py @@ -339,10 +339,11 @@ def bootstrap_teuthology(dest_path): boot_proc = subprocess.Popen(cmd, shell=True, cwd=dest_path, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + out, err = boot_proc.communicate() returncode = boot_proc.wait() log.info("Bootstrap exited with status %s", returncode) if returncode != 0: - for line in boot_proc.stdout.readlines(): + for line in out.split(): log.warn(line.strip()) venv_path = os.path.join(dest_path, 'virtualenv') log.info("Removing %s", venv_path) -- 2.39.5