When GPFS is not mounted, delete_volume() will complete successfully, so that
volume record is removed by cinder but volume file still resides on GPFS. This
change will prevent cinder to remove volume when GPFS is not mounted.
Change-Id: Ic3bf265e553f22c8b6a6e3568da04af88fab3322
Closes-Bug: #
1249411
def delete_volume(self, volume):
"""Deletes a logical volume."""
+ # Check if GPFS is mounted
+ self._verify_gpfs_path_state(self.configuration.gpfs_mount_point_base)
+
volume_path = self.local_path(volume)
self._delete_gpfs_file(volume_path)