run_tests fails in venv on my setup (lucid)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Lorin Hochstein |
Bug Description
Recently, run_tests.sh inside of a virtualenv stopped working on my setup (lucid). With git bisect, I traced it down to this commit:
commit 7eeee584ad64b5a
Author: Mark McLoughlin <email address hidden>
Date: Thu Sep 29 15:06:54 2011 +0100
install_venv: don't use --no-site-packages with virtualenv
libvirt isn't listed in pip-requires because (a) it's not in PyPi and
(b) you always want to use libvirt's python bindings that matches the
version of libvirt installed on the system.
Currently, running nova-compute in virtualenv fails because libvirt
can't be imported. The --no-site-packages flag is what prevents this.
Everything seems to work fine without it. To verify, try deleting the
no-
Change-Id: I1df5e8e3c4426c
diff --git a/tools/
index a137f11..912d0a2 100644
--- a/tools/
+++ b/tools/
@@ -89,7 +89,7 @@ def create_
virtual environment
"""
print 'Creating venv...',
- run_command(
+ run_command(
print 'done.'
print 'Installing pip in virtualenv...',
if not run_command(
Since it's related to --no-site-packages, it's probably interfering with some package setup on my machine, but I'm not sure what packages are interfering.
Here's the error message for the package that's failing (glance). The full output is attached.
$ ./run_tests.sh -f -V
Cleaning virtualenv...
done.
Creating venv... done.
Installing pip in virtualenv... done.
Installing dependencies with pip (this can take a while)...
...
Running setup.py install for glance
ERROR: Python module kombu.connection not found
ERROR: Python module swift.common.client not found
ERROR: Python module xattr not found
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-
Complete output from command /home/lorin/
ERROR: Python module kombu.connection not found
ERROR: Python module swift.common.client not found
ERROR: Python module xattr not found
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-
-------
Command /home/lorin/
Storing complete log in /home/lorin/
Command "tools/with_venv.sh pip install --upgrade -r /home/lorin/
Changed in nova: | |
milestone: | none → essex-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
assignee: | nobody → Lorin Hochstein (lorinh) |
Changed in nova: | |
milestone: | essex-1 → 2012.1 |
Reviewed: https:/ /review. openstack. org/1208 github. com/openstack/ nova/commit/ b08bd96ce5bf290 ac6198079ad2dce 71e675b481
Committed: http://
Submitter: Jenkins
Branch: master
status fixcommitted
done
commit b08bd96ce5bf290 ac6198079ad2dce 71e675b481
Author: Lorin Hochstein <email address hidden>
Date: Sun Oct 30 09:00:59 2011 -0400
Optional --no-site-packages in venv
Added a flag to run_tests.sh to allow user to optionally install venv with --no-site-packages.
This fixes bug 880905
Change-Id: Ic645e0ec56c90b 72fef526ebc9f55 975d446e2ae