Unit test failed at test_discovery_with_libvirt_error

Bug #1774292 reported by Hang Yang
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Confirmed
Undecided
Szymon Wróblewski

Bug Description

I'm using stable/queens ceilometer with libvirt-python==3.10.0. I added the libvirt-python into requirements.txt before running tox command and got the following error:

22:03:48 ==============================
22:03:48 Failed 1 tests - output below:
22:03:48 ==============================
22:03:48
22:03:48 ceilometer.tests.unit.compute.test_discovery.TestDiscovery.test_discovery_with_libvirt_error
22:03:48 --------------------------------------------------------------------------------------------
22:03:48
22:03:48 Captured traceback:
22:03:48 ~~~~~~~~~~~~~~~~~~~
22:03:48 Traceback (most recent call last):
22:03:48 File "/tmp/ceilometer/ceilometer/.tox/py27/lib/python2.7/site-packages/mock/mock.py", line 1305, in patched
22:03:48 return func(*args, **keywargs)
22:03:48 File "ceilometer/tests/unit/compute/test_discovery.py", line 298, in test_discovery_with_libvirt_error
22:03:48 resources = dsc.discover(mock.MagicMock())
22:03:48 File "ceilometer/compute/discovery.py", line 120, in discover
22:03:48 return self.discover_libvirt_polling(manager, param=None)
22:03:48 File "/tmp/ceilometer/ceilometer/.tox/py27/lib/python2.7/site-packages/tenacity/__init__.py", line 214, in wrapped_f
22:03:48 return self.call(f, *args, **kw)
22:03:48 File "/tmp/ceilometer/ceilometer/.tox/py27/lib/python2.7/site-packages/tenacity/__init__.py", line 295, in call
22:03:48 start_time=start_time)
22:03:48 File "/tmp/ceilometer/ceilometer/.tox/py27/lib/python2.7/site-packages/tenacity/__init__.py", line 244, in iter
22:03:48 retry = self.retry(fut)
22:03:48 File "/tmp/ceilometer/ceilometer/.tox/py27/lib/python2.7/site-packages/tenacity/retry.py", line 65, in __call__
22:03:48 return self.predicate(attempt.exception())
22:03:48 File "ceilometer/compute/virt/libvirt/utils.py", line 102, in is_disconnection_exception
22:03:48 return (isinstance(e, libvirt.libvirtError)
22:03:48 TypeError: isinstance() arg 2 must be a class, type, or tuple of classes and types

test_discovery_with_libvirt_error is normally skipped as requirements/test-requirements do not include the libvirt-python. @testtools.skipUnless(libvirt, "libvirt not available") But in my case I'm building an internal rpm thus need libvirt-python in requirement.txt and I expect this test case should pass.

Matthias Runge (mrunge)
Changed in ceilometer:
status: New → Incomplete
Changed in ceilometer:
assignee: nobody → Szymon Wróblewski (bluex)
Changed in ceilometer:
status: Incomplete → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer 18.0.0.0rc1

This issue was fixed in the openstack/ceilometer 18.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer 17.0.2

This issue was fixed in the openstack/ceilometer 17.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer train-eol

This issue was fixed in the openstack/ceilometer train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer ussuri-eol

This issue was fixed in the openstack/ceilometer ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer victoria-eom

This issue was fixed in the openstack/ceilometer victoria-eom release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/ceilometer wallaby-eom

This issue was fixed in the openstack/ceilometer wallaby-eom release.

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.