Arik Hadas has uploaded a new change for review. Change subject: core: do not decrease pending vm on stop of paused vm ......................................................................
core: do not decrease pending vm on stop of paused vm Now that we are decrementing the pending resources once the VM gets into 'paused' state on 'run in paused mode', we do not need to decrement the pending resources when stopping paused VM anymore. Change-Id: Ib2c4f76db8499f0dc0bcd2b08810720c46568a77 Signed-off-by: Arik Hadas <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java 1 file changed, 0 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/70/35670/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java index e75d9f4..8992dff 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/StopVmCommandBase.java @@ -21,7 +21,6 @@ import org.ovirt.engine.core.common.businessentities.DiskImage; import org.ovirt.engine.core.common.businessentities.VMStatus; import org.ovirt.engine.core.common.businessentities.VmDynamic; -import org.ovirt.engine.core.common.businessentities.VmPauseStatus; import org.ovirt.engine.core.common.errors.VdcBllMessages; import org.ovirt.engine.core.common.vdscommands.DestroyVmVDSCommandParameters; import org.ovirt.engine.core.common.vdscommands.UpdateVmDynamicDataVDSCommandParameters; @@ -81,9 +80,6 @@ } protected void destroyVm() { - boolean wasPaused = (getVm().getStatus() == VMStatus.Paused - && getVm().getVmPauseStatus() == VmPauseStatus.NOERR); - if (getVm().getStatus() == VMStatus.MigratingFrom && getVm().getMigratingToVds() != null) { Backend.getInstance() .getResourceManager() @@ -98,10 +94,6 @@ .getResourceManager() .RunVdsCommand(VDSCommandType.DestroyVm, new DestroyVmVDSCommandParameters(getVdsId(), getVmId(), getParameters().getStopReason(), false, false, 0)).getReturnValue()); - - if (wasPaused) { - VmHandler.decreasePendingVms(getVm(), getVdsId()); - } } @Override -- To view, visit http://gerrit.ovirt.org/35670 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib2c4f76db8499f0dc0bcd2b08810720c46568a77 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
