Oved Ourfali has submitted this change and it was merged.
Change subject: core: SyncLunsInfo - avoidable executions/db deadlock
......................................................................
core: SyncLunsInfo - avoidable executions/db deadlock
Currently SyncLunsInfoForBlockStorageDomainCommand is being executed
when connecting to a domain storage server. This command is resposible
to check if any of the luns of the domain were changed and in case it
did, update the DB accordingly.
When a storage domain is being activated all of it's hosts are being
connected simoltenously to the domain, which leads that
SyncLunsInfoForBlockStorageDomainCommand is executed multiple times
(once for each host) which is unneeded as it's exactly the same as
having response from one host (even if the responses of the hosts are
different, we can't decide which response is correct).
When being executed simoltenously, possibly concurrent updates from the
different threads can be made - as the order of the updates isn't
garuanteed, there's a chance for a deadlock.
This patch solves it by executes the operation for only one hosts at a
time, only in case of failure (which should be rare) the engine will
attempt to sync the luns through a different host.
Change-Id: I725964aa51ac38bf16d83cc498c5298720031632
Bug-Url:
https://bugzilla.redhat.com/1115845
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ActivateStorageDomainCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/FCPStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/ISCSIStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/IStorageHelper.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHelperBase.java
5 files changed, 40 insertions(+), 15 deletions(-)
Approvals:
Daniel Erez: Verified
Allon Mureinik: Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/31274
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I725964aa51ac38bf16d83cc498c5298720031632
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server