CLOUDSTACK-8452: Exclude non-routing hosts from getting rebalanced as part of agent LB

For agent LB, only routing hosts needs to be considered
This commit is contained in:
Koushik Das 2015-05-08 10:48:39 +05:30
parent ac2bccd2a2
commit 5f66679df3

View File

@ -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<HostVO> directHosts = sc.list();