Change in ovirt-engine[ovirt-engine-3.3]: core: deadlock and related changes in domain monitoring/Init...

iheim at redhat.com iheim at redhat.com
Tue Nov 5 10:52:37 UTC 2013


Itamar Heim 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 at 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:
  Itamar Heim: Verified; Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/20895
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I334b450fcf29ed57675ec1f2e4bf3bc43f31b4aa
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list