Arik Hadas has uploaded a new change for review. Change subject: core: decrement pending vm on 'run in paused mode' ......................................................................
core: decrement pending vm on 'run in paused mode' In a flow where VM is started in paused state neither of runningSucceeded nor runningFailed methods in RunVmCommand are called. The command is kept in the collection of async commands until the VM will be resumed. On resume, the reportCompleted method of the original RunVmCommand will be called and it will be removed from the async command collection. Thus, the pending resources are not cleared in this flow. The solution is to decrease the pending resources in the reportCompleted method if they were not decreased before. Change-Id: Icc931118a848c1c7507c407d955537761dd1a742 Bug-Url: https://bugzilla.redhat.com/1174816 Signed-off-by: Arik Hadas <aha...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/36246/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java index 55afb8d..eb33738 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommandBase.java @@ -245,6 +245,9 @@ @Override public final void reportCompleted() { try { + // decrease pending resources if they were not decreased already + decreasePendingVms(); + // end the execution job if needed ExecutionContext executionContext = getExecutionContext(); if (executionContext != null && executionContext.isMonitored() && !executionContext.isCompleted()) { -- To view, visit http://gerrit.ovirt.org/36246 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc931118a848c1c7507c407d955537761dd1a742 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches