Change in ovirt-engine[master]: Fix the race between committed memory and pending memory upd...

rgolan at redhat.com rgolan at redhat.com
Mon Feb 15 20:28:55 UTC 2016


Roy Golan has submitted this change and it was merged.

Change subject: Fix the race between committed memory and pending memory updates
......................................................................


Fix the race between committed memory and pending memory updates

The pending values are cleared once the VM monitor get the asynchronous
message announcing the state change to Powering Up (via
RunVmCommnand#OnPowerringUp, SchedulingManager#clearVm and
VdsManager#updatePendingData methods). But the committed memory of host
is not recomputed here.

The committed memory is recomputed in
HostMonitoring#refreshCommitedMemory which gets called when the polling
returns new host data. But that can take up to 15 seconds.

So we have at max a 15 second window between when we clear the pending
values and when we update the committed memory information.

The solution calls refreshCommitedMemory from the updatePendingData,
and provides the list of all VMs from the DB that should already contain
the newly received VM.

Change-Id: I6aa63edbaddcca30c9898af07316facdbee01b4e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1289468
Signed-off-by: Martin Sivak <msivak 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/monitoring/HostMonitoring.java
2 files changed, 23 insertions(+), 15 deletions(-)

Approvals:
  Martin Sivák: Verified
  Jenkins CI: Passed CI tests
  Roy Golan: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6aa63edbaddcca30c9898af07316facdbee01b4e
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list