From: Zack Cerza Date: Thu, 29 Jun 2017 15:32:57 +0000 (-0600) Subject: When bootstrapping teuthology, avoid deadlocks X-Git-Tag: 1.1.0~410^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1089%2Fhead;p=teuthology.git When bootstrapping teuthology, avoid deadlocks Use Popen.communicate() instead of Popen.wait() Signed-off-by: Zack Cerza --- diff --git a/teuthology/repo_utils.py b/teuthology/repo_utils.py index fee402e74..a0da17f6d 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)