[Bug 1480840] Re: Insufficient test isolation in cinder utils tests

James Page james.page at ubuntu.com
Thu Feb 23 18:45:12 UTC 2017


** Changed in: charm-cinder
   Importance: Undecided => Medium

** Changed in: charm-cinder
       Status: New => Triaged

** Changed in: cinder (Juju Charms Collection)
       Status: Triaged => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to cinder in Juju Charms Collection.
Matching subscriptions: charm-bugs
https://bugs.launchpad.net/bugs/1480840

Title:
  Insufficient test isolation in cinder utils tests

Status in OpenStack cinder charm:
  Triaged
Status in cinder package in Juju Charms Collection:
  Invalid

Bug description:
  Work fine on a system without /dev/vd* devices, but in the gate we do
  have those:

  14:39:32 ======================================================================
  14:39:32 ERROR: test_configure_lvm_storage_different_vg (unit_tests.test_cinder_utils.TestCinderUtils)
  14:39:32 ----------------------------------------------------------------------
  14:39:32 Traceback (most recent call last):
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
  14:39:32     return func(*args, **keywargs)
  14:39:32   File "/var/lib/jenkins/checkout/cinder/unit_tests/test_cinder_utils.py", line 381, in test_configure_lvm_storage_different_vg
  14:39:32     cinder_utils.configure_lvm_storage(devices, 'test', True, True)
  14:39:32   File "hooks/cinder_utils.py", line 451, in configure_lvm_storage
  14:39:32     ensure_lvm_volume_group_non_existent(volume_group)
  14:39:32   File "hooks/cinder_utils.py", line 389, in ensure_lvm_volume_group_non_existent
  14:39:32     if not lvm_volume_group_exists(volume_group):
  14:39:32   File "hooks/cinder_utils.py", line 369, in lvm_volume_group_exists
  14:39:32     subprocess.check_call(['vgdisplay', volume_group])
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
  14:39:32     retcode = call(*popenargs, **kwargs)
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 522, in call
  14:39:32     return Popen(*popenargs, **kwargs).wait()
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
  14:39:32     errread, errwrite)
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
  14:39:32     raise child_exception
  14:39:32 OSError: [Errno 2] No such file or directory
  14:39:32 
  14:39:32 ======================================================================
  14:39:32 ERROR: test_configure_lvm_storage_existing_vg (unit_tests.test_cinder_utils.TestCinderUtils)
  14:39:32 ----------------------------------------------------------------------
  14:39:32 Traceback (most recent call last):
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
  14:39:32     return func(*args, **keywargs)
  14:39:32   File "/var/lib/jenkins/checkout/cinder/unit_tests/test_cinder_utils.py", line 348, in test_configure_lvm_storage_existing_vg
  14:39:32     cinder_utils.configure_lvm_storage(devices, 'test', True, True)
  14:39:32   File "hooks/cinder_utils.py", line 451, in configure_lvm_storage
  14:39:32     ensure_lvm_volume_group_non_existent(volume_group)
  14:39:32   File "hooks/cinder_utils.py", line 389, in ensure_lvm_volume_group_non_existent
  14:39:32     if not lvm_volume_group_exists(volume_group):
  14:39:32   File "hooks/cinder_utils.py", line 369, in lvm_volume_group_exists
  14:39:32     subprocess.check_call(['vgdisplay', volume_group])
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
  14:39:32     retcode = call(*popenargs, **kwargs)
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 522, in call
  14:39:32     return Popen(*popenargs, **kwargs).wait()
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
  14:39:32     errread, errwrite)
  14:39:32   File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
  14:39:32     raise child_exception
  14:39:32 OSError: [Errno 2] No such file or directory
  14:39:32 
  14:39:32 ======================================================================
  14:39:32 FAIL: test_configure_lvm_storage (unit_tests.test_cinder_utils.TestCinderUtils)
  14:39:32 ----------------------------------------------------------------------
  14:39:32 Traceback (most recent call last):
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
  14:39:32     return func(*args, **keywargs)
  14:39:32   File "/var/lib/jenkins/checkout/cinder/unit_tests/test_cinder_utils.py", line 262, in test_configure_lvm_storage
  14:39:32     call('/dev/vdc')]
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 872, in assert_has_calls
  14:39:32     'Actual: %r' % (calls, self.mock_calls)
  14:39:32 AssertionError: Calls not found.
  14:39:32 Expected: [call('/dev/vdb'), call('/dev/vdc')]
  14:39:32 Actual: [call('/dev/vdc')]
  14:39:32 
  14:39:32 ======================================================================
  14:39:32 FAIL: test_configure_lvm_storage_unused_dev (unit_tests.test_cinder_utils.TestCinderUtils)
  14:39:32 ----------------------------------------------------------------------
  14:39:32 Traceback (most recent call last):
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 1210, in patched
  14:39:32     return func(*args, **keywargs)
  14:39:32   File "/var/lib/jenkins/checkout/cinder/unit_tests/test_cinder_utils.py", line 286, in test_configure_lvm_storage_unused_dev
  14:39:32     call('/dev/vdc')]
  14:39:32   File "/usr/lib/python2.7/dist-packages/mock.py", line 872, in assert_has_calls
  14:39:32     'Actual: %r' % (calls, self.mock_calls)
  14:39:32 AssertionError: Calls not found.
  14:39:32 Expected: [call('/dev/vdb'), call('/dev/vdc')]
  14:39:32 Actual: [call('/dev/vdc')]

  Worked around be prefixing device names with 'fake' but the tests
  could do with a general review to ensure we're patching appropriately.

To manage notifications about this bug go to:
https://bugs.launchpad.net/charm-cinder/+bug/1480840/+subscriptions



More information about the Ubuntu-openstack-bugs mailing list