From e0dca033349f20c5c1de7bdda93159ac0735eb36 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Fri, 10 Jan 2014 14:20:41 -0500 Subject: [PATCH] GlusterFS: Synchronize additional operations create_cloned_volume() and copy_volume_to_image() should also be locked against other driver operations to prevent collisions from concurrent updates of snapshot metadata or volume file data. Closes-Bug: #1267983 (cherry picked from commit 06999f610afc3a123f7a54895e39d690301a8eba) Change-Id: Idd6158bfbe4dc049c33fa58b40d3d570fc244d01 --- cinder/volume/drivers/glusterfs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cinder/volume/drivers/glusterfs.py b/cinder/volume/drivers/glusterfs.py index f989bc08485..e1a110ed6f4 100644 --- a/cinder/volume/drivers/glusterfs.py +++ b/cinder/volume/drivers/glusterfs.py @@ -160,6 +160,7 @@ class GlusterfsDriver(nfs.RemoteFsDriver): return snap_info['active'] + @utils.synchronized('glusterfs', external=False) def create_cloned_volume(self, volume, src_vref): """Creates a clone of the specified volume.""" @@ -907,6 +908,7 @@ class GlusterfsDriver(nfs.RemoteFsDriver): """Disallow connection from connector.""" pass + @utils.synchronized('glusterfs', external=False) def copy_volume_to_image(self, context, volume, image_service, image_meta): """Copy the volume to the specified image."""