← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1444014] Re: StaleDataError on heat stack delete

 

[Expired for neutron because there has been no activity for 60 days.]

** Changed in: neutron
       Status: Incomplete => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1444014

Title:
  StaleDataError on heat stack delete

Status in neutron:
  Expired

Bug description:
  When deleting a heat stack with a VM on a subnet connected to external
  net via DVR router, sometimes following error occures:

  2015-04-10 11:01:43.178 11666 ERROR neutron.api.v2.resource [req-333b9ecb-6c49-4146-bb2f-0b0cc827120a ] delete failed
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource Traceback (most recent call last):
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/neutron/api/v2/resource.py", line 83, in resource
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     result = method(request=request, **args)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/neutron/api/v2/base.py", line 490, in delete
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     obj_deleter(request.context, id, **kwargs)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/neutron/plugins/ml2/plugin.py", line 1254, in delete_port
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     context, id)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/neutron/db/l3_dvrscheduler_db.py", line 202, in dvr_deletens_if_no_port
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     port_host)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/local/lib/python2.7/dist-packages/neutron/db/agents_db.py", line 193, in _get_agent_by_type_and_host
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     Agent.host == host).one()
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2369, in one
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     ret = list(self)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/query.py", line 2411, in __iter__
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     self.session._autoflush()
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1198, in _autoflush
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     self.flush()
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 1919, in flush
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     self._flush(objects)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2037, in _flush
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     transaction.rollback(_capture_exception=True)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     compat.reraise(exc_type, exc_value, exc_tb)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/session.py", line 2001, in _flush
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     flush_context.execute()
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     rec.execute(self)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/unitofwork.py", line 526, in execute
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     uow
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 60, in save_obj
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     mapper, table, update)
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource   File "/usr/lib/python2.7/dist-packages/sqlalchemy/orm/persistence.py", line 536, in _emit_update_statements
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource     (table.description, len(update), rows))
  2015-04-10 11:01:43.178 11666 TRACE neutron.api.v2.resource StaleDataError: UPDATE statement on table 'ml2_dvr_port_bindings' expected to update 1 row(s); 0 were matched.

  this prevents VM for deletion and causes stack deletion failure as well.
  Most probably StaleDataError is because DVR interface port was concurrently deleted by the time transaction which tries to update record in ml2_dvr_port_bindings table is about to commit (DVR interface deletion deletes the record in ml2_dvr_port_bindings by cascade)

  The proposal is to suppress StaleDataError as it actually doesn't mean
  that anything is broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1444014/+subscriptions


References