Shireesh Anjal has submitted this change and it was merged.
Change subject: gluster: GlusterMultipleActionRunner
......................................................................
gluster: GlusterMultipleActionRunner
Gluster commands always acquire a lock on the cluster. This means that
if user selects multiple objects belonging to the same cluster and
performs an action on them, all of them try to acquire a lock on the
same cluster. The logic in MultipleActionsRunner is such that
canDoActionOnly() is called for all actions first, before trying to
execute them. This can result in a deadlock as the second action will
get blocked trying to acquire lock on the same cluster, and
executeAction() will never be invoked on first action because of this.
This is seems like a gluster-specific scenario for now, hence
introducing GlusterMultipleActionsRunner that extends from
MultipleActionsRunner and alters the behavior as follows:
- Releases the lock after invoking CanDoActionOnly
- Re-acquires the lock invoking executing executeAction
Also, MultipleActionsRunnersFactory is enhanced to create and return
object of GlusterMultipleActionsRunner for gluster related actions.
Change-Id: I0e3dc1fa0b21ab6e0fcaff518bf9696f6c9796ca
Signed-off-by: Shireesh Anjal <sanjal(a)redhat.com>
---
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GlusterMultipleActionsRunner.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MultipleActionsRunner.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MultipleActionsRunnersFactory.java
3 files changed, 126 insertions(+), 35 deletions(-)
Approvals:
Shireesh Anjal: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/10812
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I0e3dc1fa0b21ab6e0fcaff518bf9696f6c9796ca
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shireesh Anjal <sanjal(a)redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Shireesh Anjal <sanjal(a)redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs(a)redhat.com>