Arik Hadas has uploaded a new change for review. Change subject: core: add missing decrement of pending resources ......................................................................
core: add missing decrement of pending resources In a flow where VM is started in paused state neither of runningSucceeded nor runningFailed methods in RunVmCommand is 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 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/36/35636/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 e862170..01684bf 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/35636 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icc931118a848c1c7507c407d955537761dd1a742 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches