← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1383100] Re: Vmware: attach an iscsi volume to instance failed

 

*** This bug is a duplicate of bug 1386511 ***
    https://bugs.launchpad.net/bugs/1386511

This is duplicate of https://bugs.launchpad.net/nova/+bug/1386511 which
is already fixed

** Changed in: nova
   Importance: High => Undecided

** Changed in: nova
       Status: Confirmed => Invalid

** This bug has been marked a duplicate of bug 1386511
   VMWare: attach a iscsi volume to a VirtualIDEController

-- 
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/1383100

Title:
  Vmware: attach an iscsi volume to instance failed

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  When I try to attach an iscsi volume which created by cinder lvm iscsi
  driver to an instance.  I discovered the following two problems:

  1. In current code base,When attaching an iscsi volume,  it choose the adapter type the same way as the attachment of  a VMDK volume :
     def _attach_volume_iscsi(self, connection_info, instance, mountpoint):
          ......
          (vmdk_file_path, adapter_type,
           disk_type) = vm_util.get_vmdk_path_and_adapter_type(hardware_devices)

          self.attach_disk_to_vm(vm_ref, instance,
                                 adapter_type, 'rdmp',
                                 device_name=device_name)

  Indeed,   the adapter type should always be "lsiLogicsas".  It is easy
  to  appear an odd scenario that an iscsi volume is attached on an IDE
  adapter.

  
  2. The current code always  choose to rescan the first host's HBA of a cluster.

  eg. You have two hosts in a  cluster of a vcenter :  host01  and host
  02.  If you want to attach an iscsi volume to an instance spawned in
  host02.  The attach code should rescan the host02's HBA and discover
  the target. But, In fact the code is always rescan the host01's HBA:

      def _iscsi_rescan_hba(self, target_portal):
          """Rescan the iSCSI HBA to discover iSCSI targets."""
          host_mor = vm_util.get_host_ref(self._session, self._cluster)

  The "host_mor"  always represent the first host.  The following error
  may be produced:

  2014-10-20 10:50:07.917 21540 ERROR oslo.messaging.rpc.dispatcher [req-bdf00be9-194f-474d-a61b-5c998c36bdea ] Exception during message handling: The virtual disk is either corrupted or not a supported format.
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     incoming.message))
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return self._do_dispatch(endpoint, method, ctxt, args)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     result = getattr(endpoint, method)(ctxt, **new_args)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 418, in decorated_function
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/exception.py", line 88, in wrapped
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     payload)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/exception.py", line 71, in wrapped
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return f(self, context, *args, **kw)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 302, in decorated_function
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     pass
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 288, in decorated_function
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 330, in decorated_function
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     kwargs['instance'], e, sys.exc_info())
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 318, in decorated_function
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return function(self, context, *args, **kwargs)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4550, in attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     do_attach_volume(context, instance, driver_bdm)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/lockutils.py", line 272, in inner
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return f(*args, **kwargs)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4548, in do_attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     bdm.destroy(context)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4545, in do_attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return self._attach_volume(context, instance, driver_bdm)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4568, in _attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     self.volume_api.unreserve_volume(context, bdm.volume_id)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 4560, in _attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     do_check_attach=False, do_driver_attach=True)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/block_device.py", line 46, in wrapped
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     ret_val = method(obj, context, *args, **kwargs)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/block_device.py", line 261, in attach
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     connector)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/openstack/common/excutils.py", line 82, in __exit__
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     six.reraise(self.type_, self.value, self.tb)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/block_device.py", line 252, in attach
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     device_type=self['device_type'], encryption=encryption)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 455, in attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     mountpoint)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/volumeops.py", line 401, in attach_volume
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     self._attach_volume_iscsi(connection_info, instance, mountpoint)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/volumeops.py", line 387, in _attach_volume_iscsi
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     device_name=device_name)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/volumeops.py", line 73, in attach_disk_to_vm
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     vm_util.reconfigure_vm(self._session, vm_ref, vmdk_attach_config_spec)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/vm_util.py", line 1334, in reconfigure_vm
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     session._wait_for_task(reconfig_task)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/nova/virt/vmwareapi/driver.py", line 676, in _wait_for_task
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return self.wait_for_task(task_ref)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/vmware/api.py", line 382, in wait_for_task
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return evt.wait()
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/eventlet/event.py", line 121, in wait
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return hubs.get_hub().switch()
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 293, in switch
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     return self.greenlet.switch()
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/vmware/common/loopingcall.py", line 76, in _inner
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     self.f(*self.args, **self.kw)
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher   File "/usr/lib/python2.6/site-packages/oslo/vmware/api.py", line 423, in _poll_task
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher     raise task_ex
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher VMwareDriverException: The virtual disk is either corrupted or not a supported format.
  2014-10-20 10:50:07.917 21540 TRACE oslo.messaging.rpc.dispatcher

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1383100/+subscriptions


References