From: Zack Cerza Date: Thu, 22 Aug 2013 23:02:22 +0000 (-0500) Subject: Worker shouldn't attempt to rebuild an existing virtualenv X-Git-Tag: 1.1.0~1950^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F47%2Fhead;p=teuthology.git Worker shouldn't attempt to rebuild an existing virtualenv --- diff --git a/bootstrap b/bootstrap index 695180621..d03ad6661 100755 --- a/bootstrap +++ b/bootstrap @@ -13,12 +13,14 @@ if [ -n "$missing" ]; then exit 1 fi -# site packages needed because libvirt python bindings are not nicely -# packaged -virtualenv --system-site-packages --distribute virtualenv +if [ -z "$NO_CLOBBER" ] || [ ! -e ./virtualenv ]; then + # site packages needed because libvirt python bindings are not nicely + # packaged + virtualenv --system-site-packages --distribute virtualenv -# avoid pip bugs -./virtualenv/bin/pip install --upgrade pip + # avoid pip bugs + ./virtualenv/bin/pip install --upgrade pip +fi ./virtualenv/bin/pip install -r requirements.txt diff --git a/teuthology/queue.py b/teuthology/queue.py index cdd52960c..1f3606ccf 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -104,7 +104,11 @@ describe. One job is run at a time. subprocess.Popen(('git', 'reset', '--hard', 'origin/%s' % teuthology_branch), cwd=teuth_path) log.info("Bootstrapping %s", teuth_path) - subprocess.Popen(('./bootstrap'), cwd=teuth_path) + # This magic makes the bootstrap script not attempt to clobber an + # existing virtualenv. + env = os.environ.copy() + env['NO_CLOBBER'] = '1' + subprocess.Popen(('./bootstrap'), cwd=teuth_path, env) teuth_bin_path = os.path.join(teuth_path, 'virtualenv', 'bin') if not os.path.isdir(teuth_bin_path): raise RuntimeError('Teuthology branch %s not found at %s' %