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:
parent
0b71a3f0bd
commit
9c816aa0cf
|
@ -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)
|
||||
|
|
|
@ -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."""
|
||||
|
|
Loading…
Reference in New Issue