Arik Hadas has submitted this change and it was merged.
Change subject: core: prevent possible deadlock between monitoring threads
......................................................................
core: prevent possible deadlock between monitoring threads
If VM went down during migration in the source host, the monitoring
(VURTI) thread of the source host tries to destroy the VM in the
destination host. In order to destroy the VM in the destination host, it
tries to lock the destination host.
When we have two monitoring threads that try to do it, we end-up in a
deadlock because each of them locks the host it monitors and tries to
lock the other one.
This patch solves this problem by postponing the destroy operation on
the destination host to take place after the lock on the monitored host
is released.
It is safe to do it that way because the status of the VM in the
destination host must be either Down or MigratingTo. If the status is
MigratingTo, the monitoring of the destination host just ignores the VM.
If the status is Down, the monitoring of the destination host will just
destroy the VM and the second destroy operation will fail.
Change-Id: Ia4c52e0f8109f9599965078d2c6dd4db705cec97
Bug-Url:
https://bugzilla.redhat.com/1142776
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/IVdsEventListener.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
3 files changed, 35 insertions(+), 15 deletions(-)
Approvals:
Omer Frenkel: Looks good to me, approved
Arik Hadas: Verified
--
To view, visit
http://gerrit.ovirt.org/34995
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia4c52e0f8109f9599965078d2c6dd4db705cec97
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server