Cells: AttributeError: 'dict' object has no attribute 'disable_terminate'

Bug #1293750 reported by Andrew Laski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Andrew Laski

Bug Description

When a delete is issued for an instance that doesn't have a cell_name in the db, a delete is broadcast to all cells. As that message passes through the cells rpc layer the instance is converted from an object to a dict. This causes a problem when it gets to the cell since the delete methods expect to receive an object.

2014-03-13 15:21:49.717 31063 ERROR nova.cells.messaging [req-d2d5f4ea-4010-405a-b52a-8f19d3991498 10110789 5877036] Error processing message locally: 'dict' object has no attribute 'disable_terminate'
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging Traceback (most recent call last):
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/cells/messaging.py", line 211, in _process_locally
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging resp_value = self.msg_runner._process_message_locally(self)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/cells/messaging.py", line 1291, in _process_message_locally
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging return fn(message, **message.method_kwargs)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/cells/messaging.py", line 1101, in instance_delete_everywhere
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging self.compute_api.delete(message.ctxt, instance)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 199, in wrapped
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging return func(self, context, target, *args, **kwargs)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 189, in inner
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging return function(self, context, instance, *args, **kwargs)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 216, in _wrapped
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging return fn(self, context, instance, *args, **kwargs)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 170, in inner
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging return f(self, context, instance, *args, **kw)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 1710, in delete
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging self._delete_instance(context, instance)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 1700, in _delete_instance
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging task_state=task_states.DELETING)
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging File "/opt/rackstack/615.4/nova/lib/python2.6/site-packages/nova/compute/api.py", line 1395, in _delete
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging if instance.disable_terminate:
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging AttributeError: 'dict' object has no attribute 'disable_terminate'
2014-03-13 15:21:49.717 31063 TRACE nova.cells.messaging

Andrew Laski (alaski)
Changed in nova:
assignee: nobody → Andrew Laski (alaski)
importance: Undecided → Medium
status: New → In Progress
tags: added: cells icehouse-rc-potential
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/81049

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

Reviewed: https://review.openstack.org/81049
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8e3dc81837ddb76dff5267ff5fbbd750b20fc31f
Submitter: Jenkins
Branch: master

commit 8e3dc81837ddb76dff5267ff5fbbd750b20fc31f
Author: Andrew Laski <email address hidden>
Date: Mon Mar 17 15:06:48 2014 -0400

    Cells: Send instance object for instance_delete_everywhere

    The delete method in the compute api expects an instance object to be
    passed in. So the instance object needs to not be to_primitived in the
    instance_delete_everywhere rpc method.

    Change-Id: I620ec57bc28ba11335758455c7cac0bfa63f5b37
    Closes-bug: #1293750

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-rc1 → 2014.1
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.