From: Lucian Petrut Date: Fri, 27 Mar 2015 11:42:22 +0000 (+0200) Subject: SMBFS: Fix missing volume provider location X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6b78f47bb0e51323a9b2b4df72abf11cce60e396;p=openstack-build%2Fcinder-build.git SMBFS: Fix missing volume provider location In case of cloning volumes or creating volumes from snapshots, the volume provider location is not set, making the volumes unusable. This also leads to disk image leaks, because the delete volume operation will pass without deleting the disk image if the provider location is not present. The SMB driver wraps base RemoteFS methods in order to set locks. The issue is that it does not return the wrapped method return value, which signals volume updates, in this case the provider location. Change-Id: Id7435676052885d301a48fa5ac224071e18ecf5b Closes-Bug: #1437271 --- diff --git a/cinder/volume/drivers/smbfs.py b/cinder/volume/drivers/smbfs.py index 3c94d9c1c..eb4a54dd9 100644 --- a/cinder/volume/drivers/smbfs.py +++ b/cinder/volume/drivers/smbfs.py @@ -479,7 +479,7 @@ class SmbfsDriver(remotefs_drv.RemoteFSSnapDriver): @utils.synchronized('smbfs', external=False) def create_volume_from_snapshot(self, volume, snapshot): - self._create_volume_from_snapshot(volume, snapshot) + return self._create_volume_from_snapshot(volume, snapshot) def _copy_volume_from_snapshot(self, snapshot, volume, volume_size): """Copy data from snapshot to destination volume. @@ -551,7 +551,7 @@ class SmbfsDriver(remotefs_drv.RemoteFSSnapDriver): @utils.synchronized('smbfs', external=False) def create_cloned_volume(self, volume, src_vref): """Creates a clone of the specified volume.""" - self._create_cloned_volume(volume, src_vref) + return self._create_cloned_volume(volume, src_vref) def _ensure_share_mounted(self, smbfs_share): mnt_flags = []