Error during ComputeManager._poll_bandwidth_usage

Bug #933620 reported by Armando Migliaccio on 2012-02-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Armando Migliaccio

Bug Description

I see this stacktrace in the compute log.

Feb 16 13:09:52 8E-B1-AF-C3-4C-C9 nova-compute ERROR Error during ComputeManager._poll_bandwidth_usage: Object '<BandwidthUsage at 0xa42dccc>' is already attached to session '170412556' (this is '167661484')
(nova.manager): TRACE: Traceback (most recent call last):
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/", line 155, in periodic_tasks
(nova.manager): TRACE: task(self, context)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/compute/", line 2088, in _poll_bandwidth_usage
(nova.manager): TRACE: usage['bw_in'], usage['bw_out'])
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/db/", line 1561, in bw_usage_update
(nova.manager): TRACE: bw_in, bw_out)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/", line 119, in wrapper
(nova.manager): TRACE: return f(*args, **kwargs)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/", line 3737, in bw_usage_update
(nova.manager): TRACE:
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/", line 56, in save
(nova.manager): TRACE: session.add(self)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/orm/", line 1101, in add
(nova.manager): TRACE: self._save_or_update_state(state)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/orm/", line 1110, in _save_or_update_state
(nova.manager): TRACE: self._save_or_update_impl(state)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/orm/", line 1307, in _save_or_update_impl
(nova.manager): TRACE: self._update_impl(state)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/orm/", line 1299, in _update_impl
(nova.manager): TRACE: self._attach(state)
(nova.manager): TRACE: File "/usr/lib/python2.6/site-packages/SQLAlchemy-0.6.5-py2.6.egg/sqlalchemy/orm/", line 1333, in _attach
(nova.manager): TRACE: state.session_id, self.hash_key))
(nova.manager): TRACE: InvalidRequestError: Object '<BandwidthUsage at 0xa42dccc>' is already attached to session '170412556' (this is '167661484')
(nova.manager): TRACE:

It does not happen every time, I am using xenapi as backend driver. This happens on Essex trunk (or very close to it).

I'll try to dig out more info, but any further insight would be helpful.

Fix proposed to branch: master

Changed in nova:
assignee: nobody → Armando Migliaccio (armando-migliaccio)
status: New → In Progress
Changed in nova:
status: In Progress → Confirmed

Submitter: Jenkins
Branch: master

commit 57da3b12b14ce7676b51904c97a4685692d7b5cc
Author: Armando Migliaccio <email address hidden>
Date: Fri Feb 17 11:44:27 2012 +0000

    bug 933620: Error during ComputeManager._poll_bandwidth_usage

    add missing session to model query.

    Change-Id: I3cb8ebcff1fd286ef198f33514d4ce3d884c5921

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx) on 2012-02-29
Changed in nova:
milestone: none → essex-4
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2012-04-05
Changed in nova:
milestone: essex-4 → 2012.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers