Public bug reported: During an attach to an iSCSI device, the LUN may not appear as soon as the path which contains the LUNs. The XenAPI code copes with multiple (or no) LUNs for an SR, so there is a race condition where the SR is created but no VDIs are registered, leading to the following exception:
2014-01-29 08:19:41.804 ERROR nova.compute.manager [req-144fa10e-7003-45dc-a54c-f45b1b3581fd tempest.scenario.manager-tempest-1638977579-user tempest.scenario.manager-tempest-1638977579-tenant] [instance: cc864540-8650-40ea-9142-ba533c1e39f9] Failed to attach volume 2ac02e92-8880-4bd7-a382-8942ffe14f7c at /dev/xvdb 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] Traceback (most recent call last): 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/compute/manager.py", line 3852, in _attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] encryption=encryption) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 435, in attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] mountpoint) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 59, in attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] hotplug=hotplug) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 130, in _connect_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] volume_utils.forget_sr(self._session, sr_ref) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__ 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] six.reraise(self.type_, self.value, self.tb) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 108, in _connect_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] target_lun=connection_data['target_lun']) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volume_utils.py", line 160, in introduce_vdi 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] vdi_rec = session.call_xenapi("VDI.get_record", vdi_ref) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] UnboundLocalError: local variable 'vdi_ref' referenced before assignment ** Affects: nova Importance: Undecided Status: New -- 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/1274088 Title: XenAPI: iscsi connection may not show VDI during attach Status in OpenStack Compute (Nova): New Bug description: During an attach to an iSCSI device, the LUN may not appear as soon as the path which contains the LUNs. The XenAPI code copes with multiple (or no) LUNs for an SR, so there is a race condition where the SR is created but no VDIs are registered, leading to the following exception: 2014-01-29 08:19:41.804 ERROR nova.compute.manager [req-144fa10e-7003-45dc-a54c-f45b1b3581fd tempest.scenario.manager-tempest-1638977579-user tempest.scenario.manager-tempest-1638977579-tenant] [instance: cc864540-8650-40ea-9142-ba533c1e39f9] Failed to attach volume 2ac02e92-8880-4bd7-a382-8942ffe14f7c at /dev/xvdb 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] Traceback (most recent call last): 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/compute/manager.py", line 3852, in _attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] encryption=encryption) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/driver.py", line 435, in attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] mountpoint) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 59, in attach_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] hotplug=hotplug) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 130, in _connect_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] volume_utils.forget_sr(self._session, sr_ref) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__ 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] six.reraise(self.type_, self.value, self.tb) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volumeops.py", line 108, in _connect_volume 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] target_lun=connection_data['target_lun']) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] File "/opt/stack/nova/nova/virt/xenapi/volume_utils.py", line 160, in introduce_vdi 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] vdi_rec = session.call_xenapi("VDI.get_record", vdi_ref) 2014-01-29 08:19:41.804 TRACE nova.compute.manager [instance: cc864540-8650-40ea-9142-ba533c1e39f9] UnboundLocalError: local variable 'vdi_ref' referenced before assignment To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1274088/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp