yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #32626
[Bug 1451860] [NEW] Attached volume migration failed, due to incorrect arguments order passed to swap_volume
Public bug reported:
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
** Affects: nova
Importance: Undecided
Status: New
** Tags: nova volume-migration
** Attachment added: "screen-n-cpu.log"
https://bugs.launchpad.net/bugs/1451860/+attachment/4391417/+files/screen-n-cpu.log
--
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):
New
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
Follow ups
-
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Alan Pevec, 2015-07-29
-
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Alan Pevec, 2015-07-23
-
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Thierry Carrez, 2015-06-24
-
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Kevin Carter, 2015-06-05
-
[Bug 1451860] Re: Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Bjoern Teipel, 2015-05-26
-
[Bug 1451860] [NEW] Attached volume migration failed, due to incorrect arguments order passed to swap_volume
From: Peter Wang, 2015-05-05
References