From 6b78f47bb0e51323a9b2b4df72abf11cce60e396 Mon Sep 17 00:00:00 2001 From: Lucian Petrut Date: Fri, 27 Mar 2015 13:42:22 +0200 Subject: [PATCH] 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 --- cinder/volume/drivers/smbfs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = [] -- 2.45.2