run_test.sh broken for RequiredOptError: value required for option: lock_path

Bug #1264058 reported by Qiu Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Qiu Yu
tempest
Invalid
Undecided
Unassigned

Bug Description

Steps To Reproduce
----------------------------
./run_tests.sh nova.tests.integrated.test_api_samples

Versions Affected
-------------------------
Trunk version after Dec. 21 2013, with following commit

commit 78d62186e5b0388f740d42cb8da5798cd67d7880
Refs: 2014.1.b1-281-g78d6218
Author: Roman Podoliaka <email address hidden>
AuthorDate: Tue Dec 17 13:52:45 2013 +0200
Commit: Roman Podoliaka <email address hidden>
CommitDate: Thu Dec 19 18:08:29 2013 +0200

    Fix interprocess locks when running unit-tests

Symptom
--
Unit cases fail with following exception message.

stderr: {{{
/home/stack/nova/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/expression.py:1927: SAWarning: The IN-predicate on "instances.uuid" was invoked with an empty sequence. This results in a contradiction, which nonetheless can be expensive to evaluate. Consider alternative strategies for improved performance.
  return self._in_impl(operators.in_op, operators.notin_op, other)
}}}

Traceback (most recent call last):
  File "/home/stack/nova/nova/tests/integrated/test_api_samples.py", line 97, in setUp
    super(ApiSampleTestBaseV2, self).setUp()
  File "/home/stack/nova/nova/tests/integrated/integrated_helpers.py", line 81, in setUp
    self._setup_services()
  File "/home/stack/nova/nova/tests/integrated/integrated_helpers.py", line 94, in _setup_services
    self.network = self.start_service('network')
  File "/home/stack/nova/nova/test.py", line 284, in start_service
    svc = self.useFixture(ServiceFixture(name, host, **kwargs))
  File "/home/stack/nova/.venv/local/lib/python2.7/site-packages/testtools/testcase.py", line 609, in useFixture
    fixture.setUp()
  File "/home/stack/nova/nova/test.py", line 175, in setUp
    self.service.start()
  File "/home/stack/nova/nova/service.py", line 172, in start
    self.manager.init_host()
  File "/home/stack/nova/nova/network/manager.py", line 1718, in init_host
    self.l3driver.initialize(fixed_range=False, networks=networks)
  File "/home/stack/nova/nova/network/l3.py", line 94, in initialize
    linux_net.metadata_forward()
  File "/home/stack/nova/nova/network/linux_net.py", line 647, in metadata_forward
    iptables_manager.apply()
  File "/home/stack/nova/nova/network/linux_net.py", line 426, in apply
    self._apply()
  File "/home/stack/nova/nova/openstack/common/lockutils.py", line 246, in inner
    with lock(name, lock_file_prefix, external, lock_path):
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/stack/nova/nova/openstack/common/lockutils.py", line 183, in lock
    raise cfg.RequiredOptError('lock_path')
RequiredOptError: value required for option: lock_path

Qiu Yu (unicell)
Changed in nova:
assignee: nobody → Qiu Yu (unicell)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: New → In Progress
Revision history for this message
Kun Huang (academicgareth) wrote :

Hi tempest developers

As described in Qiu's commit message, should this kind of mistake caused by adding new module be prevented by some tests?

Revision history for this message
Joe Gordon (jogo) wrote :

Kung, no this doesn't belong in tempest. This was an issue with the unit tests, and tempest doesn't does integration testing.

Changed in tempest:
status: New → Invalid
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/64006
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d1eaf822682245318a9499c53c4f5d02fa3a52bd
Submitter: Jenkins
Branch: master

commit d1eaf822682245318a9499c53c4f5d02fa3a52bd
Author: Qiu Yu <email address hidden>
Date: Wed Dec 25 17:14:33 2013 +0800

    Fix interprocess locks for run_tests.sh

    In recent change of commit 78d62186e5b0388f740d42cb8da5798cd67d7880 tox
    test has been switched to use openstack.common.lockutils module for
    interprocess locks. However, run_tests.sh is left unchanged, which hit a
    regression when running tests with run_tests.sh

    This change applies the same change in commit 78d621 for tox.ini to
    run_tests.sh, i.e. using openstack.common.lockutils to create temporary
    directory for locks and pass it as env variables to all tests.

    Closes-Bug: #1264058
    Change-Id: I007bd39e4d9aad7539b4b7389eb5189b5d1f10e2

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-2 → 2014.1
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.