Kobi Ianko has uploaded a new change for review.

Change subject: core: Check that the host status is 'UP' before HA reservation 
calc.
......................................................................

core: Check that the host status is 'UP' before HA reservation calc.

Making sure the only hosts in 'UP' status are in the HA reservation calculation.

Change-Id: Ibfd8eb840d70bb0c2f345f04e328cccc5a92439f
Bug-Url: https://bugzilla.redhat.com/1057579
Signed-off-by: Kobi Ianko <k...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/25/24725/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
index e5ae390..630e42c 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/HaReservationHandling.java
@@ -8,6 +8,7 @@
 
 import org.ovirt.engine.core.common.businessentities.VDS;
 import org.ovirt.engine.core.common.businessentities.VDSGroup;
+import org.ovirt.engine.core.common.businessentities.VDSStatus;
 import org.ovirt.engine.core.common.businessentities.VM;
 import org.ovirt.engine.core.common.utils.Pair;
 import org.ovirt.engine.core.compat.Guid;
@@ -32,7 +33,7 @@
      *         impacting performance.
      */
     public boolean checkHaReservationStatusForCluster(VDSGroup cluster, 
List<VDS> failedHosts) {
-        List<VDS> hosts = 
DbFacade.getInstance().getVdsDao().getAllForVdsGroup(cluster.getId());
+        List<VDS> hosts = 
DbFacade.getInstance().getVdsDao().getAllForVdsGroupWithStatus(cluster.getId(), 
VDSStatus.Up);
 
         // No hosts, return true
         if (hosts == null || hosts.isEmpty()) {


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfd8eb840d70bb0c2f345f04e328cccc5a92439f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Kobi Ianko <k...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to