Change in ovirt-engine[ovirt-engine-3.6]: backend: Fix Deadlock in multiple hostdev RunVmCommands

tnisan at redhat.com tnisan at redhat.com
Wed Aug 12 10:50:15 UTC 2015


Tal Nisan has submitted this change and it was merged.

Change subject: backend: Fix Deadlock in multiple hostdev RunVmCommands
......................................................................


backend: Fix Deadlock in multiple hostdev RunVmCommands

The eager synchronous instantiation of Commands in MultipleActionsRunner
combined with host device lock being obtained in @PostConstruct of RunVmCommand
resulted in deadlock in initCommandsAndReturnValues() method.

The deadlock was resolved by moving the acquireHostDeviceLock() to
RunVmCommand#canDoAction() and releasing it immediately after check
with cooperation of the runVm() method that obtains it again and holds
it during the actual host device operations.

Change-Id: I64135e46be0dfb6dd71dde862d44f5afa1f1a7b9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1248104
Signed-off-by: Martin Betak <mbetak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/errors/EngineError.java
M backend/manager/modules/dal/src/main/resources/bundles/VdsmErrors.properties
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/VdsmErrors.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/VdsmErrors.properties
M packaging/dbscripts/host_device_sp.sql
7 files changed, 43 insertions(+), 20 deletions(-)

Approvals:
  Jenkins CI: Passed CI tests
  Martin Betak: Verified
  Omer Frenkel: Looks good to me, approved



-- 
To view, visit https://gerrit.ovirt.org/44413
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I64135e46be0dfb6dd71dde862d44f5afa1f1a7b9
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list