diff options
| author | Walter A. Boring IV <walter.boring@hp.com> | 2013-05-15 16:00:43 -0700 |
|---|---|---|
| committer | Walter A. Boring IV <walter.boring@hp.com> | 2013-06-10 14:10:03 -0700 |
| commit | 080476b2d383b148f6fc8d202c3b0509f9bb1d66 (patch) | |
| tree | 49e8e835257239bb0821a939760f0f768deeee6f /nova/virt | |
| parent | 9116b2448ef90011fe2acea1d7c6e3b070fe75b3 (diff) | |
Fix dangling LUN issue under load with multipath
This fixes an issue where not all of the LUNs are seen
by the kernel at attach time, but later become available.
We now rescan the list of devices seen by multipath at
detach time.
Also added another unit test case.
Fixes Bug: #1175366
Change-Id: Id5b313b17454ec32672373b7b564b9450466b7a2
Diffstat (limited to 'nova/virt')
| -rw-r--r-- | nova/virt/libvirt/volume.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/virt/libvirt/volume.py b/nova/virt/libvirt/volume.py index 34fd9c772..4a11e2704 100644 --- a/nova/virt/libvirt/volume.py +++ b/nova/virt/libvirt/volume.py @@ -753,6 +753,7 @@ class LibvirtFibreChannelVolumeDriver(LibvirtBaseVolumeDriver): % {'device': mdev_info['device']}) device_path = mdev_info['device'] connection_info['data']['devices'] = mdev_info['devices'] + connection_info['data']['multipath_id'] = mdev_info['id'] else: # we didn't find a multipath device. # so we assume the kernel only sees 1 device @@ -774,6 +775,15 @@ class LibvirtFibreChannelVolumeDriver(LibvirtBaseVolumeDriver): self).disconnect_volume(connection_info, mount_device) devices = connection_info['data']['devices'] + # If this is a multipath device, we need to search again + # and make sure we remove all the devices. Some of them + # might not have shown up at attach time. + if 'multipath_id' in connection_info['data']: + multipath_id = connection_info['data']['multipath_id'] + mdev_info = linuxscsi.find_multipath_device(multipath_id) + devices = mdev_info['devices'] + LOG.debug("devices to remove = %s" % devices) + # There may have been more than 1 device mounted # by the kernel for this volume. We have to remove # all of them |
