From: Eric Harney Date: Mon, 25 Nov 2013 21:39:03 +0000 (-0500) Subject: GlusterFS: Set correct permissions for volume file created via clone X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=9c816aa0cf20ff0200831f58d8f14efb5e9e288e;p=openstack-build%2Fcinder-build.git GlusterFS: Set correct permissions for volume file created via clone This is currently done when creating a new volume from scratch, but not when cloning a new volume. Closes-Bug: #1254768 Change-Id: I8506dc0824bacdb6cc42b4cadd41c2cad3a74b5b --- diff --git a/cinder/tests/test_glusterfs.py b/cinder/tests/test_glusterfs.py index 58822be04..bb3020e3a 100644 --- a/cinder/tests/test_glusterfs.py +++ b/cinder/tests/test_glusterfs.py @@ -1443,6 +1443,7 @@ class GlusterFsDriverTestCase(test.TestCase): mox.StubOutWithMock(image_utils, 'convert_image') mox.StubOutWithMock(drv, '_read_info_file') mox.StubOutWithMock(image_utils, 'qemu_img_info') + mox.StubOutWithMock(drv, '_set_rw_permissions_for_all') dest_volume = self._simple_volume( 'c1073000-0000-0000-0000-0000000c1073') @@ -1484,6 +1485,8 @@ class GlusterFsDriverTestCase(test.TestCase): image_utils.convert_image(src_vol_path, dest_vol_path, 'raw') + drv._set_rw_permissions_for_all(dest_vol_path) + mox.ReplayAll() drv._copy_volume_from_snapshot(snapshot, dest_volume, size) diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index 7f7497c37..4f8f8f2ed 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -265,6 +265,8 @@ class GlusterfsDriver(nfs.RemoteFsDriver): path_to_new_vol, out_format) + self._set_rw_permissions_for_all(path_to_new_vol) + @utils.synchronized('glusterfs', external=False) def delete_volume(self, volume): """Deletes a logical volume."""