From 5f66679df34a5fa38d1c58bbc96f4261edeb9b4a Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Fri, 8 May 2015 10:48:39 +0530 Subject: [PATCH] CLOUDSTACK-8452: Exclude non-routing hosts from getting rebalanced as part of agent LB For agent LB, only routing hosts needs to be considered --- .../cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java b/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java index be75cf2bd18..254f1bf0bbb 100644 --- a/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java +++ b/engine/orchestration/src/com/cloud/cluster/agentlb/ClusterBasedAgentLoadBalancerPlanner.java @@ -61,6 +61,7 @@ public class ClusterBasedAgentLoadBalancerPlanner extends AdapterBase implements sc = QueryBuilder.create(HostVO.class); sc.and(sc.entity().getManagementServerId(), Op.EQ, msId); + sc.and(sc.entity().getType(), Op.EQ, Host.Type.Routing); sc.and(sc.entity().getStatus(), Op.EQ, Status.Up); List directHosts = sc.list();