Unittests test_libvirt fails if libvirt actually installed on system

Bug #1174401 reported by Vasyl Khomenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

I'm trying to run unittests and got lot of fails.
I have libvirt installed and it seems that fake libvirt drivver don't work in such env.

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 946, in test_xml_and_uri
    expect_kernel=True, expect_ramdisk=True)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 12

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_no_kernel
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 939, in test_xml_and_uri_no_kernel
    expect_kernel=False, expect_ramdisk=False)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 14

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_no_ramdisk
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 933, in test_xml_and_uri_no_ramdisk
    expect_kernel=True, expect_ramdisk=False)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 12

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_no_ramdisk_no_kernel
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 914, in test_xml_and_uri_no_ramdisk_no_kernel
    expect_kernel=False, expect_ramdisk=False)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 14

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_rescue
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 953, in test_xml_and_uri_rescue
    expect_ramdisk=True, rescue=instance_data)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 12

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_rescue_no_kernel
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 964, in test_xml_and_uri_rescue_no_kernel
    expect_ramdisk=True, rescue=instance_data)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 14

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_rescue_no_kernel_no_ramdisk
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 958, in test_xml_and_uri_rescue_no_kernel_no_ramdisk
    expect_ramdisk=False, rescue=instance_data)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 14

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

======================================================================
FAIL: nova.tests.test_libvirt.LibvirtConnTestCase.test_xml_and_uri_rescue_no_ramdisk
----------------------------------------------------------------------
_StringException: pythonlogging:'nova': {{{
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
Loading network driver 'nova.network.linux_net'
URI qemu:///system does not support events
}}}

Traceback (most recent call last):
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 970, in test_xml_and_uri_rescue_no_ramdisk
    expect_ramdisk=False, rescue=instance_data)
  File "/root/openstack/nova/app/nova/tests/test_libvirt.py", line 2011, in _check_xml_and_uri
    (check(tree), expected_result, i))
MismatchError: !=:
reference = '00020003-0004-0005-0006-000700080009'
actual = 'cef19ce0-0ca2-11df-855d-b19fbce37686'
: 00020003-0004-0005-0006-000700080009 != cef19ce0-0ca2-11df-855d-b19fbce37686 failed check 12

-------------------- >> begin captured logging << --------------------
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.network.driver: INFO: Loading network driver 'nova.network.linux_net'
nova.virt.libvirt.driver: WARNING: URI qemu:///system does not support events
--------------------- >> end captured logging << ---------------------

Tags: libvirt
Revision history for this message
Michael Still (mikal) wrote :

This is very strange, as I have libvirt installed on my development machine and these unit tests pass for me. Can you try rebuilding your venv and see if that fixes the problem? In fact, are you using a venv at all?

Changed in nova:
status: New → Incomplete
Revision history for this message
Vasyl Khomenko (vkhomenko) wrote :

Hi.
This bug was seen without venv on centos 6.4.

Hans Lindgren (hanlind)
Changed in nova:
status: Incomplete → New
tags: added: libvirt
Revision history for this message
Ben Nemec (bnemec) wrote :

Confirming because there appears to be enough information to reproduce (or not) - run tests on CentOS 6.4 with libvirt installed.

Changed in nova:
status: New → Confirmed
Revision history for this message
Joe Gordon (jogo) wrote :

Is this still valid,?

Changed in nova:
status: Confirmed → Incomplete
Revision history for this message
Sean Dague (sdague) wrote :

old incomplete bug

Changed in nova:
status: Incomplete → Invalid
Revision history for this message
Sean Dague (sdague) wrote :

Also, testing without a venv is not really valid for unit tests.

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.