Merge prop 1879 unit tests failing on Jenkins that should pass

Bug #901027 reported by Lorin Hochstein
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Core Infrastructure
Fix Released
High
James E. Blair

Bug Description

Nova merge prop 1879 <https://review.openstack.org/1879> is failing in Jenkins unit tests, although the tests pass on my local machine, and author's local machine.

Failing Jenkins job: https://jenkins.openstack.org/job/gate-nova-unittests/172/

Lorin Hochstein (lorinh)
summary: - Unit tests failing on Jenkins that should pass
+ Merge prop 1879 unit tests failing on Jenkins that should pass
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Thanks for submitting this bug, Lorin.

Some more details: the changes to the run_tests.sh script require that the source directory (assumed to be the current working directory) to be in PYTHONPATH. For example, running the tests like this, should cause them to pass:

 $ PYTHONPATH=.:$PYTHONPATH ./run_tests.sh -V

James E. Blair (corvus)
Changed in openstack-ci:
status: New → In Progress
assignee: nobody → James E. Blair (corvus)
Revision history for this message
James E. Blair (corvus) wrote :

It's a result of the virtualenv caching and relocation we do on Jenkins. The install_venv.py script does:
    # Tell the virtual env how to "import nova"
    pthfile = os.path.join(venv, "lib", PY_VERSION, "site-packages",
                        "nova.pth")
    f = open(pthfile, 'w')
    f.write("%s\n" % ROOT)

Which isn't corrected by making the venv relocatable. I've added the following command to the jenkins venv copy job:

  perl -MCwd -ple '$CWD=Cwd::abs_path();s,^/.*/workspace/.*,$CWD,' -i .nova-venv/lib/python2.7/site-packages/*.pth

Which should take care of that. We'll want to get this in all of the venv copy jobs; ideally by combining them.

Changed in openstack-ci:
importance: Undecided → High
status: In Progress → Fix Released
no longer affects: nova
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.