Tal Nisan 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(a)redhat.com>
---
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/HostMonitoring.java
M
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsManager.java
2 files changed, 23 insertions(+), 15 deletions(-)
Approvals:
Tal Nisan: Passed CI tests
Martin Sivák: Verified
Roy Golan: Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/53551
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6aa63edbaddcca30c9898af07316facdbee01b4e
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6.3
Gerrit-Owner: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Sivák <msivak(a)redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>