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 <msi...@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 <msi...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Martin Sivák <msi...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to