compute periodic task _poll_bandwidth_usage fails if no network attached to vif

Bug #901819 reported by Brian Waldon
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Jason Kölker

Bug Description

I saw the following traceback in my compute manager log:

2011-12-07 17:26:09,500 ERROR nova.manager [-] Error during ComputeManager._poll_bandwidth_usage: 'VirtualInterface' object has no attribute 'network'
(nova.manager): TRACE: Traceback (most recent call last):
(nova.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/manager.py", line 155, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1847, in _poll_bandwidth_usage
(nova.manager): TRACE: vif.network.label,
(nova.manager): TRACE: AttributeError: 'VirtualInterface' object has no attribute 'network'

Revision history for this message
Chris Behrens (cbehrens) wrote :

I just saw this too! Although it's not because there's no network attached to vif... it's because network was untied from vif in the models.

Revision history for this message
Chris Behrens (cbehrens) wrote :

Shoot. xenapi's get_all_bw_usage() does a db.virtual_interface_get_by_address() which now needs to be a call to the network manager.

Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → High
status: New → In Progress
Revision history for this message
Jason Kölker (jason-koelker) wrote :
Changed in nova:
assignee: Jason Kölker (jason-koelker) → nobody
status: In Progress → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Jason Kölker (jason-koelker)
status: Confirmed → In Progress
Brian Waldon (bcwaldon)
Changed in nova:
milestone: none → essex-4
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3644
Committed: http://github.com/openstack/nova/commit/9b1b65a4395511b07e15a521de3a3a66c4bdcfaa
Submitter: Jenkins
Branch: master

commit 9b1b65a4395511b07e15a521de3a3a66c4bdcfaa
Author: Jason Kölker <email address hidden>
Date: Mon Dec 12 16:41:40 2011 -0600

    Fix _poll_bandwidth_usage if no network on vif

    Bugfix for lp901819

    Move DB lookups out of the virt layer for bw usage.
    Migrate to storing the mac address in the table.
    Only lookup network label when sending usage events.
    Attempt to use info_cache for label lookup before
        punting to rpc call.

    Change-Id: Iffb4bc220804be7d5fe26d6416b90cd747b72753

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.