yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #36222
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
** Changed in: nova/kilo
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1451860
Title:
Attached volume migration failed, due to incorrect arguments order
passed to swap_volume
Status in OpenStack Compute (nova):
Fix Released
Status in OpenStack Compute (nova) kilo series:
Fix Released
Status in openstack-ansible:
Fix Released
Bug description:
Steps to reproduce:
1. create a volume in cinder
2. boot a server from image in nova
3. attach this volume to server
4. use ' cinder migrate --force-host-copy True 3fa956b6-ba59-46df-8a26-97fcbc18fc82 openstack-wangp11-02@pool_backend_1#Pool_1'
log from nova compute:( see attched from detail info):
2015-05-05 00:33:31.768 ERROR root [req-b8424cde-e126-41b0-a27a-ef675e0c207f admin admin] Original exception being dropped: ['Traceback (most recent ca
ll last):\n', ' File "/opt/stack/nova/nova/compute/manager.py", line 351, in decorated_function\n return function(self, context, *args, **kwargs)\n
', ' File "/opt/stack/nova/nova/compute/manager.py", line 4982, in swap_volume\n context, old_volume_id, instance_uuid=instance.uuid)\n', "Attribut
eError: 'unicode' object has no attribute 'uuid'\n"]
according to my debug result:
# here parameters passed to swap_volume
def swap_volume(self, ctxt, instance, old_volume_id, new_volume_id):
return self.manager.swap_volume(ctxt, instance, old_volume_id,
new_volume_id)
# swap_volume function
@wrap_exception()
@reverts_task_state
@wrap_instance_fault
def swap_volume(self, context, old_volume_id, new_volume_id, instance):
"""Swap volume for an instance."""
context = context.elevated()
bdm = objects.BlockDeviceMapping.get_by_volume_id(
context, old_volume_id, instance_uuid=instance.uuid)
connector = self.driver.get_volume_connector(instance)
You can find: passed in order is "self, ctxt, instance, old_volume_id, new_volume_id" while function definition is "self, context, old_volume_id, new_volume_id, instance"
this cause the 'unicode' object has no attribute 'uuid'\n" error when
trying to access instance['uuid']
BTW: this problem was introduced in
https://review.openstack.org/#/c/172152
affect both Kilo and master
Thanks
Peter
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1451860/+subscriptions
References