Change in ovirt-engine[master]: core: do not ignore down event on destroy vm

Code Review gerrit at ovirt.org
Thu Dec 29 13:30:38 UTC 2016


>From Arik Hadas <ahadas at redhat.com>:

Arik Hadas has submitted this change and it was merged.

Change subject: core: do not ignore down event on destroy vm
......................................................................


core: do not ignore down event on destroy vm

Since we introduced the separation of host and VMs monitoring plus events,
it takes too much time to power-off a VM. Power-off should be a quick
operation - similar to unplug the power cable from a physical machine.
However, it can now take up to 15 seconds in the worst case for this
operation to finish (and even 20sec considering the UI refresh rate):
1. the engine locks the VM with its monitoring lock.
2. engine sends destroy call to VDSM.
3. VDSM sends an event that the VM is destroyed.
4. the engine ignores the event since because of the VM is locked.
5. the VM remains in Powering Down status until the next polling cycle.

Sure, events should be queued and not ignored, but this is a too complex
change to do at the moment. This patch introduces an alternative approach
that eliminates the lock in destroy-VM flow.

Change-Id: I14931877309867bbbc0115e3a384e39757e3234c
Bug-Url: https://bugzilla.redhat.com/1367023
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/DestroyVmVDSCommand.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmManager.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/monitoring/VmAnalyzer.java
4 files changed, 72 insertions(+), 11 deletions(-)

Approvals:
  Shahar Havivi: Looks good to me, approved
  Jenkins CI: Passed CI tests
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14931877309867bbbc0115e3a384e39757e3234c
Gerrit-PatchSet: 14
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Sharon Gratch <sgratch at redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>


More information about the Engine-commits mailing list