check_uptodate.sh need run in venv

Bug #1219197 reported by Kui Shi on 2013-08-31
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Kui Shi

Bug Description

tools/conf/check_uptodate.sh is added in run_tests.sh

For simple, run "run_tests.sh -p" will call it, and get following error:

Failed to collect options from module cinder.volume.drivers.san.hp.hp_3par_common: No module named hp3parclient

Actually, the hp3parclient is listed in test-requirements.txt, and it is installed in venv.

the check_uptodate.sh should run in venv to get correct result.

Kui Shi (skuicloud) wrote :

A more directly test command is to run tools/conf/check_uptodate.sh.

If run this shell script in venv, it runs well.

$ source .venv/bin/activate
$ tools/conf/check_uptodate.sh

So, this script needs venv.

Changed in cinder:
assignee: nobody → Kui Shi (skuicloud)
Kui Shi (skuicloud) wrote :

For tox.ini, tox has its own venv, no need to add wrapper.
and jenkins use tox for testing, so the adding of check_uptodate.sh can pass the jenkins checking.

Kui Shi (skuicloud) wrote :

If the cinder.conf.sample is not up to date, we should run tools/conf/generate_sample.sh in vevn.

$ source .venv/bin/activate; tools/conf/generate_sample.sh

(.venv)kui@kui-virtual-machine:/opt/stack/cinder$ deactivate

kui@kui-virtual-machine:/opt/stack/cinder$ ./run_tests.sh -p
Running flake8 ...

Fix proposed to branch: master
Review: https://review.openstack.org/44589

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/44589
Committed: http://github.com/openstack/cinder/commit/91e2466f2dd9dcdcaf1d443be66b51c861182784
Submitter: Jenkins
Branch: master

commit 91e2466f2dd9dcdcaf1d443be66b51c861182784
Author: Kui Shi <email address hidden>
Date: Sat Aug 31 19:24:38 2013 +0800

    Add venv wrapper for check_uptodate.sh

    tools/conf/check_uptodate.sh is added in run_tests.sh

    For simple, run "run_tests.sh -p" will call it, and get following error:

    Failed to collect options from module
    cinder.volume.drivers.san.hp.hp_3par_common: No module named hp3parclient

    Actually, the hp3parclient is listed in test-requirements.txt, and it is
    installed in venv.

    the check_uptodate.sh should run in venv to get correct result.

    update the error message to update the cindier.conf.sample correctly.

    -----------
    Test method
    -----------
    $ pwd
    /opt/stack/cinder

    $ source .venv/bin/activate; tools/conf/generate_sample.sh

    (.venv)$ deactivate

    $ ./run_tests.sh -p
    Running flake8 ...
    // no error emitted here

    Fixes Bug #1219197

    Change-Id: I9b3eaf3c1a5eb395eefed28bb907685cdef147aa

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-09-05
Changed in cinder:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-10-17
Changed in cinder:
milestone: havana-3 → 2013.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers