destroy() method broken on Docker virt driver

Bug #1244829 reported by Sam Alba
44
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Sam Alba

Bug Description

Just saw that virt drivers now take an extra arg "context" on the destroy method. For some reason, it has not been added to the docker driver... The destroy method with the driver enabled currently fails with the following error:

2013-10-25 23:03:20.764 ERROR nova.openstack.common.rpc.amqp [req-75ff872a-fd4d-4b63-a587-93b9fd3ede4b demo demo] Exception during message handling
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/openstack/common/rpc/amqp.py", line 461, in _process_data
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp **args)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/openstack/common/rpc/dispatcher.py", line 172, in dispatch
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 353, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/exception.py", line 90, in wrapped
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp payload)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/exception.py", line 73, in wrapped
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp return f(self, context, *args, **kw)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 243, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp pass
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 229, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 294, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp function(self, context, *args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 271, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp e, sys.exc_info())
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 258, in decorated_function
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1792, in terminate_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp do_terminate_instance(instance, bdms)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 246, in inner
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp return f(*args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1784, in do_terminate_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp reservations=reservations)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/hooks.py", line 105, in inner
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp rv = f(*args, **kwargs)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1757, in _delete_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp user_id=user_id)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1729, in _delete_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp self._shutdown_instance(context, db_inst, bdms)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1662, in _shutdown_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp requested_networks)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp File "/opt/stack/nova/nova/compute/manager.py", line 1652, in _shutdown_instance
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp context=context)
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp TypeError: destroy() got an unexpected keyword argument 'context'
2013-10-25 23:03:20.764 TRACE nova.openstack.common.rpc.amqp

Sam Alba (samalba)
Changed in nova:
assignee: nobody → Sam Alba (samalba)
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/53971

Changed in nova:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

There is a competing bug report - https://bugs.launchpad.net/nova/+bug/1244828

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

Reviewed: https://review.openstack.org/53971
Committed: http://github.com/openstack/nova/commit/c0e546ace478277cc2911b1c5bef1e082b76b546
Submitter: Jenkins
Branch: master

commit c0e546ace478277cc2911b1c5bef1e082b76b546
Author: Sam Alba <email address hidden>
Date: Fri Oct 25 16:22:32 2013 -0700

    Fixes the destroy() method for the Docker virt driver

    * Added the missing "context" argument in nova/virt/driver.py
    * Added the missing argument in the test_virt_drivers.destroy() as well so it
    will make sure none of the other drivers will miss it.

    Change-Id: I083b935da95c28ad4f9879036ef2bf7c1fbbb58e
    Closes-Bug: #1244829

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