Oved Ourfali has submitted this change and it was merged.
Change subject: core: change decrease pending memory & cpu places
......................................................................
core: change decrease pending memory & cpu places
We used to decrease the pending memory & CPU in 3 places:
1. RunVmCommandBase#onPoweringUp: we wanted to decrease the pending
resources as soon as we know the VM is running, i.e when it reaches the
POWERING_UP state
2. RunVmCommandBase#rerun: when the VM fails to run on a host, we
decreased the pending resources on that host
3. MigrateVmCommand#reportCompleted: in 48af8ddc we added it, so the
pending resources will be decreased when migration is done as well.
This patch changes the locations where the pending memory & CPU is
decreased such that locations #1 and #2 that mentioned above will
remain, and instead of the third location we're now decreasing them in
RunVmCommandBase#runningSucceeded & RunVmCommandBase#runningFailed.
reportCompleted is not supposed to be overridden and is not the place
where the reduction should be made. This method should only finish the
monitoring job/step. The runningSucceeded & runningFailed are the more
appropriate places for that.
A positive side-effect of this change is that we're now decreasing the
pending memory & CPU in other flows it should be decreased in, such as
when resume paused VM which was paused for more than 1 minute.
Change-Id: I8a3a10864d64e67a36942e01869b8f41c67f032a
Bug-Url:
https://bugzilla.redhat.com/1049321
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MigrateVmCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java
2 files changed, 16 insertions(+), 18 deletions(-)
Approvals:
Omer Frenkel: Looks good to me, approved
Arik Hadas: Verified
--
To view, visit
http://gerrit.ovirt.org/28121
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8a3a10864d64e67a36942e01869b8f41c67f032a
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server