Change in ovirt-engine[master]: gluster: Introduced locking on gluster clusters

Omer Frenkel has submitted this change and it was merged. Change subject: gluster: Introduced locking on gluster clusters ...................................................................... gluster: Introduced locking on gluster clusters GlusterManager can potentially interfere with BLL commands that execute a gluster command and then update DB with appropriate changes. Hence it is required that all such gluster BLL commands acquire a lock before performing their logic, and release it in the end. To enable this, added the @LockIdNameAttribute annotation on all gluster commands that require the locking, and overrode the method getExclusiveLocks() in GlusterCommandBase and GlusterVolumeCommandBase to make sure that the lock is acquired on the id of the gluster cluster on which the action is being performed. Also modified the GlusterManager to acquire and release locks at appropriate places when syncing information with GlusterFS. Introduced a new LockingGroup GLUSTER for all gluster related locking. Change-Id: I57b3bd0b9e384ff130c4083147ac228a81185a2d Signed-off-by: Shireesh Anjal <sanjal@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/AddBricksToGlusterVolumeCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/CreateGlusterVolumeCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/DeleteGlusterVolumeCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterManager.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeCommandBase.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterVolumeRemoveBricksCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/RemoveGlusterServerCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ResetGlusterVolumeOptionsCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/SetGlusterVolumeOptionCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StartGlusterVolumeCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/StopGlusterVolumeCommand.java M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterManagerTest.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/locks/LockingGroup.java 14 files changed, 131 insertions(+), 18 deletions(-) Approvals: Omer Frenkel: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/9782 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I57b3bd0b9e384ff130c4083147ac228a81185a2d Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shireesh Anjal <sanjal@redhat.com> Gerrit-Reviewer: Michael Kublin <mkublin@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofrenkel@redhat.com> Gerrit-Reviewer: Roy Golan <rgolan@redhat.com> Gerrit-Reviewer: Shireesh Anjal <sanjal@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzaslavs@redhat.com>
participants (1)
-
ofrenkel@redhat.com