libvirt inspector pollster Net : AttributeError

Bug #1180466 reported by Swann Croiset
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Unassigned
Grizzly
Fix Released
High
Eoghan Glynn

Bug Description

on devstack with quantum enabled, i get an AttributeError since code trying to get the inexistant tag filterref/filter.
i suspect the filter param is not always configured depending on network configuration.

i can submit a patch if relevant.

2013-05-15 16:24:07 INFO [ceilometer.compute.manager] [57082896] Polling pollster net
2013-05-15 16:24:07 INFO [ceilometer.compute.pollsters.net] [57082896] checking instance 779793bd-5c01-4def-a2f1-03d07cc3606d
2013-05-15 16:24:08 WARNING [ceilometer.compute.pollsters.net] [57082896] Ignoring instance instance-00000006: 'NoneType' object has no attribute 'get'
2013-05-15 16:24:08 ERROR [ceilometer.compute.pollsters.net] [57082896] 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/mnt/git/myceilo/ceilometer/compute/pollsters.py", line 238, in get_counters
    for vnic, info in manager.inspector.inspect_vnics(instance_name):
  File "/mnt/git/myceilo/ceilometer/compute/virt/libvirt/inspector.py", line 113, in inspect_vnics
    fref = iface.find('filterref').get('filter')
AttributeError: 'NoneType' object has no attribute 'get'

my libvirt XML dump :

    <interface type='bridge'>
      <mac address='fa:16:3e:96:33:f0'/>
      <source bridge='qbr420008b3-7c'/>
      <target dev='tap420008b3-7c'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

note : my devstack linving inside a cloud instance, image is an ubuntu 12.4

Revision history for this message
Eoghan Glynn (eglynn) wrote :

Hi Swann,

Thanks for the report. Please go ahead and propose your patch.

Cheers,
Eoghan

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/29353
Committed: http://github.com/openstack/ceilometer/commit/f5d82ac17c0f8dfaed92670649c4bed0794dacf6
Submitter: Jenkins
Branch: master

commit f5d82ac17c0f8dfaed92670649c4bed0794dacf6
Author: Swann Croiset <email address hidden>
Date: Thu May 16 12:16:39 2013 +0200

    vnics: don't presume existence of filterref/filter

    With quantum/ovs plugin, there is no necessarily a "filteref" in interface param.
    If not present don't lookup the "filter", let it to None and no more use
    vnics.fref as resource_id.
    resource_id becomes : instance_name + instance_uuid + vnic_name

    fix Bug #1180466

    Change-Id: I21c15f9ee4bd5303a7f2e287c7fe69aa7d0d5b0a

Changed in ceilometer:
status: New → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-1
status: Fix Committed → Fix Released
Eoghan Glynn (eglynn)
tags: added: grizzly-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/grizzly)

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/31206

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/grizzly)

Reviewed: https://review.openstack.org/31206
Committed: http://github.com/openstack/ceilometer/commit/ebcac3c2f66bccd4572329b04cd46d4a6369d2a2
Submitter: Jenkins
Branch: stable/grizzly

commit ebcac3c2f66bccd4572329b04cd46d4a6369d2a2
Author: Swann Croiset <email address hidden>
Date: Thu May 16 12:16:39 2013 +0200

    vnics: don't presume existence of filterref/filter

    With quantum/ovs plugin, there is no necessarily a "filteref" in interface param.
    If not present don't lookup the "filter", let it to None and no more use
    vnics.fref as resource_id.
    resource_id becomes : instance_name + instance_uuid + vnic_name

    fix Bug #1180466

    Change-Id: I21c15f9ee4bd5303a7f2e287c7fe69aa7d0d5b0a
    (cherry picked from commit f5d82ac17c0f8dfaed92670649c4bed0794dacf6)

tags: added: in-stable-grizzly
Eoghan Glynn (eglynn)
Changed in ceilometer:
importance: Undecided → High
Alan Pevec (apevec)
tags: removed: grizzly-backport-potential in-stable-grizzly
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-1 → 2013.2
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.