OpenStack Telemetry (Ceilometer)

libvirt pollster fails with TypeError when importing nova compute driver

Reported by Eoghan Glynn on 2012-11-13
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Medium
Eoghan Glynn

Bug Description

The libvirt pollster fails as follows:

2012-11-13 14:40:31 22259 ERROR ceilometer.compute.manager [-] __init__() takes at least 2 arguments (1 given)
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager Traceback (most recent call last):
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager File "/opt/stack/ceilometer/ceilometer/compute/manager.py", line 56, in publish_counters_from_one_pollster
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager for c in ext.obj.get_counters(manager, instance):
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager File "/opt/stack/ceilometer/ceilometer/compute/libvirt.py", line 105, in get_counters
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager conn = get_libvirt_connection()
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager File "/opt/stack/ceilometer/ceilometer/compute/libvirt.py", line 48, in get_libvirt_connection
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager FLAGS.compute_driver)
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager File "/opt/stack/ceilometer/ceilometer/openstack/common/importutils.py", line 51, in import_object_ns
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager return import_class(import_value)(*args, **kwargs)
2012-11-13 14:40:31 22259 TRACE ceilometer.compute.manager TypeError: __init__() takes at least 2 arguments (1 given)

Eoghan Glynn (eglynn) on 2012-11-13
Changed in ceilometer:
assignee: nobody → Eoghan Glynn (eglynn)

Fix proposed to branch: master
Review: https://review.openstack.org/15992

Changed in ceilometer:
status: New → In Progress
Eoghan Glynn (eglynn) on 2012-11-13
Changed in ceilometer:
importance: Undecided → Medium

Reviewed: https://review.openstack.org/15992
Committed: http://github.com/openstack/ceilometer/commit/090964310b2eb57874edfd81001b75c7cb42c096
Submitter: Jenkins
Branch: master

commit 090964310b2eb57874edfd81001b75c7cb42c096
Author: Eoghan Glynn <email address hidden>
Date: Tue Nov 13 16:31:00 2012 +0000

    Avoid TypeError when loading libvirt.LibvirtDriver

    Fixes bug 1078304

    The libvirt.LibvirtDriver.__init__() signature has changed since:

      https://github.com/openstack/nova/commit/081b652c

    to take a new virtapi parameter. This is not required by any
    ceilometer usage of the driver, however the absence of a
    corresponding argument causes importutils.import_object_ns()
    to fail with TypeError.

    For testing the nova fake.FakeVirtAPI still uses the old
    signature, hence we try both.

    Change-Id: I05a9728ceb435a72f5fa8a648cd70b079126396e

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-01-09
Changed in ceilometer:
milestone: none → grizzly-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2013-04-04
Changed in ceilometer:
milestone: grizzly-2 → 2013.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers