From: Bharat Kumar Kobagana Date: Wed, 1 Jul 2015 16:14:43 +0000 (+0530) Subject: GlusterFS: support extending a volume that has snapshots X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=59dd95f36532296a7442000866fe08ccddcd1a74;p=openstack-build%2Fcinder-build.git GlusterFS: support extending a volume that has snapshots GlusterFS driver currently prevents extending a volume that has snapshots. This patch enables this feature to GlusterFS driver. Closes-Bug: #1470148 Change-Id: I763b1a84f32277f3efab2382ad144768bee59aa6 --- diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index bd9e0fa6e..312e2fc36 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -321,14 +321,6 @@ class GlusterfsDriver(remotefs_drv.RemoteFSSnapDriver, driver.CloneableVD, @remotefs_drv.locked_volume_id_operation def extend_volume(self, volume, size_gb): volume_path = self.local_path(volume) - volume_filename = os.path.basename(volume_path) - - # Ensure no snapshots exist for the volume - active_image = self.get_active_image_from_info(volume) - if volume_filename != active_image: - msg = _('Extend volume is only supported for this' - ' driver when no snapshots exist.') - raise exception.InvalidVolume(msg) info = self._qemu_img_info(volume_path, volume['name']) backing_fmt = info.file_format