*** This bug is a duplicate of bug 1838666 ***
    https://bugs.launchpad.net/bugs/1838666

The actual version of libvirt on the system shouldn't matter, these
tests should not be running against a real libvirt, everything should be
faked out. My guess is the tests are using unordered dicts and that's
why the keys are in a different order, or something with the way the xml
comparison code is asserting the attributes.

** Tags added: libvirt testing

** Also affects: nova/stein
   Importance: Undecided
       Status: New

-- 
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/1841667

Title:
  failing libvirt tests: need ordering

Status in OpenStack Compute (nova):
  New
Status in OpenStack Compute (nova) stein series:
  New

Bug description:
  When rebuilding Nova from Stein in Debian Sid, I get 3 unit test
  errors, probably due to a more recent libvirt (ie: 5.6.0). See for
  example, on this first one:

  <target bus="virtio" dev="vda"/>

  we get bus= and dev= inverted.

  ======================================================================
  FAIL: 
nova.tests.unit.virt.libvirt.test_driver.LibvirtDriverTestCase.test_get_disk_xml
  
nova.tests.unit.virt.libvirt.test_driver.LibvirtDriverTestCase.test_get_disk_xml
  ----------------------------------------------------------------------
  _StringException: pythonlogging:'': {{{2019-08-27 20:26:05,026 WARNING 
[os_brick.initiator.connectors.remotefs] Connection details not present. 
RemoteFsClient may not initialize properly.}}}

  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/libvirt/test_driver.py", line 
20926, in test_get_disk_xml
      self.assertEqual(diska_xml.strip(), actual_diska_xml.strip())
    File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in 
assertEqual
      self.assertThat(observed, matcher, message)
    File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in 
assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = '''\
  <disk type="file" device="disk">
    <source file="disk1_file"/>
    <target bus="virtio" dev="vda"/>
    <serial>0e38683e-f0af-418f-a3f1-6b67ea0f919d</serial>
  </disk>'''
  actual    = '''\
  <disk type="file" device="disk">
    <source file="disk1_file"/>
    <target dev="vda" bus="virtio"/>
    <serial>0e38683e-f0af-418f-a3f1-6b67ea0f919d</serial>
  </disk>'''

  
  ======================================================================
  FAIL: 
nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_detach_volume_with_vir_domain_affect_live_flag
  
nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_detach_volume_with_vir_domain_affect_live_flag
  ----------------------------------------------------------------------
  _StringException: pythonlogging:'': {{{2019-08-27 20:26:31,189 WARNING 
[os_brick.initiator.connectors.remotefs] Connection details not present. 
RemoteFsClient may not initialize properly.}}}

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/mock/mock.py", line 1330, in patched
      return func(*args, **keywargs)
    File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/libvirt/test_driver.py", line 
7955, in test_detach_volume_with_vir_domain_affect_live_flag
      """, flags=flags)
    File "/usr/lib/python3/dist-packages/mock/mock.py", line 944, in 
assert_called_with
      six.raise_from(AssertionError(_error_message(cause)), cause)
    File "<string>", line 3, in raise_from
  AssertionError: expected call not found.
  Expected: detachDeviceFlags('<disk type="file" device="disk">\n  <source 
file="/path/to/fake-volume"/>\n  <target bus="virtio" dev="vdc"/>\n</disk>\n', 
flags=3)
  Actual: detachDeviceFlags('<disk type="file" device="disk">\n  <source 
file="/path/to/fake-volume"/>\n  <target dev="vdc" bus="virtio"/>\n</disk>\n', 
flags=3)

  
  ======================================================================
  FAIL: 
nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_update_volume_xml
  
nova.tests.unit.virt.libvirt.test_driver.LibvirtConnTestCase.test_update_volume_xml
  ----------------------------------------------------------------------
  _StringException: pythonlogging:'': {{{2019-08-27 20:26:37,451 WARNING 
[os_brick.initiator.connectors.remotefs] Connection details not present. 
RemoteFsClient may not initialize properly.}}}

  Traceback (most recent call last):
    File "/<<PKGBUILDDIR>>/nova/tests/unit/virt/libvirt/test_driver.py", line 
10157, in test_update_volume_xml
      etree.tostring(config, encoding='unicode'))
    File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 411, in 
assertEqual
      self.assertThat(observed, matcher, message)
    File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 498, in 
assertThat
      raise mismatch_error
  testtools.matchers._impl.MismatchError: !=:
  reference = '<domain type="kvm"><devices><disk type="block" 
device="disk"><driver name="qemu" type="raw" cache="none"/><source 
dev="/dev/disk/by-path/ip-1.2.3.4:3260-iqn.cde.67890.opst-lun-Z"/><target 
bus="virtio" 
dev="vdb"/><serial>58a84f6d-3f0c-4e19-a0af-eb657b790657</serial><address 
type="pci" domain="0x0" bus="0x0" slot="0x04" 
function="0x0"/></disk></devices></domain>'
  actual    = '<domain type="kvm"><devices><disk type="block" 
device="disk"><driver name="qemu" type="raw" cache="none"/><source 
dev="/dev/disk/by-path/ip-1.2.3.4:3260-iqn.cde.67890.opst-lun-Z"/><target 
dev="vdb" 
bus="virtio"/><serial>58a84f6d-3f0c-4e19-a0af-eb657b790657</serial><address 
type="pci" domain="0x0" bus="0x0" slot="0x04" 
function="0x0"/></disk></devices></domain>'

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

-- 
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to     : yahoo-eng-team@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help   : https://help.launchpad.net/ListHelp

Reply via email to