]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
When bootstrapping teuthology, avoid deadlocks 1089/head
authorZack Cerza <zack@redhat.com>
Thu, 29 Jun 2017 15:32:57 +0000 (09:32 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 29 Jun 2017 15:37:13 +0000 (09:37 -0600)
Use Popen.communicate() instead of Popen.wait()

Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/repo_utils.py

index fee402e744872d18b341f5960912eb89155d22ed..a0da17f6d57c5b7fa164dadbe35b3802fb10d5df 100644 (file)
@@ -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)