Change in ovirt-engine[master]: core: change decrease pending memory & cpu places

ofrenkel at redhat.com ofrenkel at redhat.com
Tue Mar 4 09:44:34 UTC 2014


Omer Frenkel 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 at 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(+), 17 deletions(-)

Approvals:
  Gilad Chaplik: Looks good to me, but someone else must approve
  Omer Frenkel: Looks good to me, approved
  Arik Hadas: Verified



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a3a10864d64e67a36942e01869b8f41c67f032a
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchaplik at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek 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