Arik Hadas has uploaded a new change for review.

Change subject: core: fix the check for powering up vms
......................................................................

core: fix the check for powering up vms

We used to take into account many transitions to UP & POWERING_UP
statuses as powering-up events. Powering-up events are now used only for
decrement of pending resources so many such transitions are irrelevant.
The relevant transitions are:
* WAIT_FOR_LAUNCH --> POWERING_UP
* PAUSED + no pause reason --> POWERING_UP
All other transitions to POWERING_UP should not trigger decrement of the
pending resources and all other transitions to UP should trigger the
runningSucceeded method of the Run command which will decrease the
pending resources.

Change-Id: I9cacf9cd3f5e659da6cc8c4c97dbb23fa537a154
Signed-off-by: Arik Hadas <aha...@redhat.com>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/37/34737/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
index 5771ea2..c77f52a 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VdsUpdateRunTimeInfo.java
@@ -1784,8 +1784,8 @@
                 if (vmToUpdate != null) {
                     logVmStatusTransition(vmToUpdate, runningVm);
 
-                    if ((vmToUpdate.getStatus() != VMStatus.Up && 
vmToUpdate.getStatus() != VMStatus.PoweringUp && runningVm.getStatus() == 
VMStatus.Up)
-                            || (vmToUpdate.getStatus() != VMStatus.PoweringUp 
&& runningVm.getStatus() == VMStatus.PoweringUp)) {
+                    if (runningVm.getStatus() == VMStatus.PoweringUp && 
(vmToUpdate.getStatus() == VMStatus.WaitForLaunch ||
+                            (vmToUpdate.getStatus() == VMStatus.Paused && 
vmToUpdate.getVmPauseStatus() == VmPauseStatus.NOERR))) {
                         _poweringUpVms.add(runningVm);
                     }
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cacf9cd3f5e659da6cc8c4c97dbb23fa537a154
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

Reply via email to