Tal Nisan has submitted this change and it was merged.
Change subject: core: deadlock and related changes in domain monitoring/InitVdsOnUp
......................................................................
core: deadlock and related changes in domain monitoring/InitVdsOnUp
The following patches fixes few issues related to the given bug:
1. Deadlock between domain failover process and InitVdsOnUp flows -
Thread 1 (domain failover process) - runs within the event queue (a),
attempts to call SetVdsStatus command that waits for lock on
VdsManager.getLockObj() (b)
Thread 2 - InitVdsOnUp - runs through the VdsManager.OnTimer with lock on
VdsManager.getLockObj() (b) and waits for event submitted to the event
queue to be executed (a)
The implemented solution is to call SetVdsStatus executed from thread 1
on a new thread which will also reduce the wait time for the mutex.
2. Domain monitoring information should be processed from hosts that are
"Up", if the host is not UP it means that something is wrong with
that domain regardless (for example, if the host was moved to non-op
status because of problematic report of domain, there's no reason to
analyze each time its domain report).
3. Reduce calls to SetVdsStatus thus reducing acquired locks and wait
time in case that the host isn't UP (if the host is already not up
because
of some other reason, there's no need to change it's status).
Change-Id: I334b450fcf29ed57675ec1f2e4bf3bc43f31b4aa
Bug-Url:
https://bugzilla.redhat.com/965972
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/irsbroker/IrsBrokerCommand.java
2 files changed, 31 insertions(+), 21 deletions(-)
Approvals:
Tal Nisan: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/20400
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I334b450fcf29ed57675ec1f2e4bf3bc43f31b4aa
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Liron Ar <laravot(a)redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgotliv(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server