commit bd5c5d5bbd808b4f83da58dce433cac711575bee
Author: Sampath Priyankara <email address hidden>
Date: Sun Aug 3 15:23:23 2014 +0900
Fix for volume detach error when use NFS as the cinder backend
For NFS volumes, every time you detach a volume, nova tries to umount
the device path. If the device path is busy (or in use), it should
output a message to log and continue.
In current code, if the device is busy, it cannot catch the ‘device is busy’
message returned by umount, because it looking for the ‘target is busy’.
Therefore, current code skip the ‘if’ statement and run the ‘else’ and
raise the exception.
Fix: Add ‘device is busy’ to if statement.
Add a mock test to check the behaviour of the
virt.libvirt.volume.LibvirtNFSVolumeDriver.disconnect_volume
when it has umount errors.
Reviewed: https:/ /review. openstack. org/111553 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=bd5c5d5bbd8 08b4f83da58dce4 33cac711575bee
Committed: https:/
Submitter: Jenkins
Branch: master
commit bd5c5d5bbd808b4 f83da58dce433ca c711575bee
Author: Sampath Priyankara <email address hidden>
Date: Sun Aug 3 15:23:23 2014 +0900
Fix for volume detach error when use NFS as the cinder backend
For NFS volumes, every time you detach a volume, nova tries to umount
the device path. If the device path is busy (or in use), it should
output a message to log and continue.
In current code, if the device is busy, it cannot catch the ‘device is busy’
message returned by umount, because it looking for the ‘target is busy’.
Therefore, current code skip the ‘if’ statement and run the ‘else’ and
raise the exception.
Fix: Add ‘device is busy’ to if statement.
Add a mock test to check the behaviour of the libvirt. volume. LibvirtNFSVolum eDriver. disconnect_ volume
virt.
when it has umount errors.
Closes-Bug: #1340552
Change-Id: Iac946c37064c5f 5bf5a102305de40 d21d16846c1