Tempest fails to generate test list

Bug #1592509 reported by Hugh Saunders
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
High
Hugh Saunders
Liberty
Fix Released
Undecided
Hugh Saunders
Mitaka
Fix Released
Undecided
Hugh Saunders

Bug Description

Sometimes tempest fails to generate a test list, because conflicting versions of oslo packages are installed. Example stack trace:

--------------------------------------------------------
${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./tempest/test_discover} --list
--- import errors ---
Failed to import test module: tempest.test_discover.test_discover
Traceback (most recent call last):
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
    module = self._get_module_from_name(name)
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
    __import__(name)
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/tempest/test_discover/test_discover.py", line 18, in <module>
    from tempest.test_discover import plugins
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/tempest/test_discover/plugins.py", line 21, in <module>
    from tempest.lib.common.utils import misc
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/tempest/lib/common/utils/misc.py", line 19, in <module>
    from oslo_log import log as logging
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/lib/python2.7/site-packages/oslo_log/log.py", line 49, in <module>
    from oslo_log import _options
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/lib/python2.7/site-packages/oslo_log/_options.py", line 38, in <module>
    help='If set to true, the logging level will be set to '
  File "/opt/tempest_0e25a90793a17728ab235d21ee282db31add3d74/lib/python2.7/site-packages/oslo_config/cfg.py", line 982, in __init__
    super(BoolOpt, self).__init__(name, type=types.Boolean(), **kwargs)
TypeError: __init__() got an unexpected keyword argument 'mutable'
--------------------------------------------------------

The process that leads to this is:
1) Tempest cloned from git
2) Venv downloaded from repo server and unarchived into tempest checkout
3) Tempest installed from checkout into venv, bringing in deps from pypi (--isolated), and upgrading some packages.

On upgrade / playbook re-run
4) Tempest archive re-expanded into tempest git dir, replacing newer pypi packages with older ones from the deploy's repo server.
5) stack trace.

This was first reported in downstream project RPC-Openstack: https://github.com/rcbops/rpc-openstack/issues/1119

Revision history for this message
Hugh Saunders (hughsaunders) wrote :

This is already fixed in master: https://github.com/openstack/openstack-ansible-os_tempest/blob/master/tasks/tempest_install.yml#L127-L136

Introduced by review: https://review.openstack.org/#/c/310766/

So this bug only affects liberty and before.

Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

During todays bug triage meeting, it was decided to backport the commit to liberty and mitaka.
Kilo will stay the same.

Changed in openstack-ansible:
assignee: nobody → Hugh Saunders (hughsaunders)
status: New → Confirmed
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

The bug fixing should be applied on Mitaka first, and then Liberty will be evaluated.
No direct backport to liberty should be done.

Changed in openstack-ansible:
importance: Undecided → High
Revision history for this message
Hugh Saunders (hughsaunders) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstack-ansible (liberty)

Reviewed: https://review.openstack.org/347488
Committed: https://git.openstack.org/cgit/openstack/openstack-ansible/commit/?id=bf8d8f7d8707bf393d096504be429281eb65a8cb
Submitter: Jenkins
Branch: liberty

commit bf8d8f7d8707bf393d096504be429281eb65a8cb
Author: Hugh Saunders <email address hidden>
Date: Wed Jul 27 11:58:12 2016 +0100

    Clean tempest dir before cloning.

    This ensures that the code is recloned and if a venv is used, it is
    unpacked into a clean clone. If a venv is unpacked multiple times (eg
    multiple runs of the playbook) into the same dir then that venv may
    become inconsistent.

    This is a minimal fix for liberty as the full patch didn't backport
    cleanly.

    Bug: #1592509
    Change-Id: I6f3c36a8150b83afabae8d397d5fc7340dbc93fd
    Related-to: 13edcc092597b7109d0f75435ab4d07d56149998

Changed in openstack-ansible:
status: Confirmed → Fix Released
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.