← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1369973] Re: libvirt test cases fail due to lockutils error when run via testtools

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-rc1

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1369973

Title:
  libvirt test cases fail due to lockutils error when run via testtools

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  When running libvirt tests via testtools.run, there are a number of
  cases which fail due to lockutils setup

  $ .venv/bin/python -m testtools.run nova.tests.virt.libvirt.test_driver
  ..snip...
  ======================================================================
  ERROR: nova.tests.virt.libvirt.test_driver.IptablesFirewallTestCase.test_multinic_iptables
  ----------------------------------------------------------------------
  pythonlogging:'': {{{INFO [nova.network.driver] Loading network driver 'nova.network.linux_net'}}}

  Traceback (most recent call last):
    File "nova/tests/virt/libvirt/test_driver.py", line 10182, in test_multinic_iptables
      self.fw.prepare_instance_filter(instance_ref, network_info)
    File "nova/virt/firewall.py", line 184, in prepare_instance_filter
      self.refresh_provider_fw_rules()
    File "nova/virt/firewall.py", line 474, in refresh_provider_fw_rules
      self._do_refresh_provider_fw_rules()
    File "nova/openstack/common/lockutils.py", line 267, in inner
      with lock(name, lock_file_prefix, external, lock_path):
    File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
      return self.gen.next()
    File "nova/openstack/common/lockutils.py", line 231, in lock
      ext_lock = external_lock(name, lock_file_prefix, lock_path)
    File "nova/openstack/common/lockutils.py", line 180, in external_lock
      lock_file_path = _get_lock_path(name, lock_file_prefix, lock_path)
    File "nova/openstack/common/lockutils.py", line 171, in _get_lock_path
      raise cfg.RequiredOptError('lock_path')
  RequiredOptError: value required for option: lock_path

  The tox.ini / run_tests.sh work around this problem by using "-m
  nova.openstack.common.lockutils" but this is somewhat tedious to
  remember to add. A simple mock addition to the tests in question can
  avoid the issue in the first place.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1369973/+subscriptions


References