VMware: Volume attach fails with "VMwareDriverException: A specified parameter was not correct."

Bug #1419474 reported by Vipin Balachandran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Vipin Balachandran

Bug Description

Steps to reproduce:
* Attach vol-1 to vm-1
* Change host and datastore of vm-1
* Detach vol-1 from vm-1
* Attach vol-1 to vm-1

2015-02-04 14:30:21.098 DEBUG oslo.vmware.exceptions [-] Fault InvalidArgument not matched. from (pid=21418) get_fault_class /usr/local/lib/python2.7/dist-packages/oslo/vmware/exceptions.py:249
2015-02-04 14:30:21.098 ERROR oslo.vmware.common.loopingcall [-] in fixed duration looping call
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall Traceback (most recent call last):
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall File "/usr/local/lib/python2.7/dist-packages/oslo/vmware/common/loopingcall.py", line 76, in _inner
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall self.f(*self.args, **self.kw)
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall File "/usr/local/lib/python2.7/dist-packages/oslo/vmware/api.py", line 424, in _poll_task
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall raise task_ex
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall VMwareDriverException: A specified parameter was not correct.
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall config.extraConfig["volume-e375857b-5b8f-409a-9303-db6d33956fe1"]
2015-02-04 14:30:21.098 TRACE oslo.vmware.common.loopingcall
2015-02-04 14:30:21.099 ERROR nova.virt.block_device [req-737b0e79-f91d-41b4-96f0-7449251545b9 admin demo] [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] Driver failed to attach volume e375857b-5b8f-409a-9303-db6d33956fe1 at /dev/sdb
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] Traceback (most recent call last):
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/block_device.py", line 249, in attach
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] device_type=self['device_type'], encryption=encryption)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 479, in attach_volume
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] return _volumeops.attach_volume(connection_info, instance)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 427, in attach_volume
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] self._attach_volume_vmdk(connection_info, instance)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 395, in _attach_volume_vmdk
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] self._update_volume_details(vm_ref, instance, data['volume_id'])
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/volumeops.py", line 151, in _update_volume_details
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] vm_util.reconfigure_vm(self._session, vm_ref, extra_config_specs)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/vm_util.py", line 1625, in reconfigure_vm
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] session._wait_for_task(reconfig_task)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/opt/stack/nova/nova/virt/vmwareapi/driver.py", line 668, in _wait_for_task
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] return self.wait_for_task(task_ref)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/usr/local/lib/python2.7/dist-packages/oslo/vmware/api.py", line 387, in wait_for_task
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] return evt.wait()
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 121, in wait
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] return hubs.get_hub().switch()
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 293, in switch
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/usr/local/lib/python2.7/dist-packages/oslo/vmware/common/loopingcall.py", line 76, in _inner
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] self.f(*self.args, **self.kw)
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] File "/usr/local/lib/python2.7/dist-packages/oslo/vmware/api.py", line 424, in _poll_task
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] raise task_ex
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] VMwareDriverException: A specified parameter was not correct.
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] config.extraConfig["volume-e375857b-5b8f-409a-9303-db6d33956fe1"]
2015-02-04 14:30:21.099 TRACE nova.virt.block_device [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591]
2015-02-04 14:30:21.100 DEBUG nova.volume.cinder [req-737b0e79-f91d-41b4-96f0-7449251545b9 admin demo] Cinderclient connection created using URL: http://192.168.200.151:8776/v1/4c54a363542f4d899dd48c0d38e46475 from (pid=21418) cinderclient /opt/stack/nova/nova/volume/cinder.py:93
2015-02-04 14:30:21.167 ERROR nova.compute.manager [req-737b0e79-f91d-41b4-96f0-7449251545b9 admin demo] [instance: 0f756e6b-f8c0-4efc-880e-216ebb943591] Failed to attach e375857b-5b8f-409a-9303-db6d33956fe1 at /dev/sdb

Tags: vmware
Changed in nova:
assignee: nobody → Vipin Balachandran (vbala)
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/153878

Changed in nova:
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

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

commit dcff2c7cc96c19ed93520781bded83807290a8a3
Author: Vipin Balachandran <email address hidden>
Date: Thu Feb 5 15:44:33 2015 +0530

    VMware: Fix disk UUID in instance's extra config

    During volume attach, the UUID of volume's virtual disk
    is saved in instance's extra config. The virtual disk is
    searched by volume's UUID assuming that the disk name
    contains volume's UUID. But this assumption may not be
    true always. Once the instance is migrated with an attached
    volume, the volume's vmdk name changes after volume detach.
    This patch fixes the problem by using the disk device info
    of volume instead of searching the virtual disk by volume
    UUID.

    Change-Id: Ic3a249dff65e9abafe3986789607a855df4e8481
    Closes-Bug: #1419474

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