diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-06-10 23:30:50 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-06-10 23:30:50 +0000 |
| commit | 5bfa143c56dc2c6fa79acc4417e80823336fc46a (patch) | |
| tree | 641f1fd719a94fd0620051a350a5902c8b4c3ace /nova/virt | |
| parent | f85e4ec079283f4217415b4fd6a37ced189bc49a (diff) | |
| parent | 080476b2d383b148f6fc8d202c3b0509f9bb1d66 (diff) | |
Merge "Fix dangling LUN issue under load with multipath"
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 |
