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
This commit is contained in:
Eric Harney 2013-11-25 16:39:03 -05:00
parent 0b71a3f0bd
commit 9c816aa0cf
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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."""