Change in ovirt-engine[ovirt-engine-3.3]: core: Clean pending memory and CPUs only during init

iheim at redhat.com iheim at redhat.com
Thu Nov 28 15:50:33 UTC 2013


Itamar Heim has submitted this change and it was merged.

Change subject: core: Clean pending memory and CPUs only during init
......................................................................


core: Clean pending memory and CPUs only during init

When the engine tries to start a VM, we leave pending memory
and CPU information in the database. This information is removed
when the VDSM reports the VM as fully Up.

However when the engine crashes without telling VDSM, the info
needs to be removed as no VM was actually started.

We dealt with this in VdsUpdateRuntimeInfo so far, but that caused
a race condition: We removed the pending data because the engine
did not manage to send the VM start event to VDSM before the next
VDSM update.

This patch moves the cleanup to the engine startup routines to
make sure it gets applied only in cases of real engine crashes.

Change-Id: I84c2ba29368c0b6bc400087512d7b3a68c5c8f5c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1008146
Signed-off-by: Martin Sivak <msivak at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/SchedulingManager.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/ResourceManager.java
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
3 files changed, 38 insertions(+), 21 deletions(-)

Approvals:
  Itamar Heim: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84c2ba29368c0b6bc400087512d7b3a68c5c8f5c
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzelkha at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server



More information about the Engine-commits mailing list