@@ -170,8 +170,8 @@ private org.apache.cloudstack.agent.lb.IndirectAgentLBAlgorithm getAgentMSLBAlgo
170
170
public void propagateMSListToAgents () {
171
171
logger .debug ("Propagating management server list update to agents" );
172
172
final String lbAlgorithm = getLBAlgorithmName ();
173
+ final Long globalLbCheckInterval = getLBPreferredHostCheckInterval (null );
173
174
List <DataCenterVO > zones = dataCenterDao .listAll ();
174
- Long lbCheckInterval = getLBPreferredHostCheckInterval (null );
175
175
for (DataCenterVO zone : zones ) {
176
176
List <Long > zoneHostIds = new ArrayList <>();
177
177
List <Long > nonRoutingHostIds = getAllAgentBasedNonRoutingHostsFromDB (zone .getId ());
@@ -185,13 +185,13 @@ public void propagateMSListToAgents() {
185
185
}
186
186
zoneHostIds .sort (Comparator .comparingLong (x -> x ));
187
187
for (Long nonRoutingHostId : nonRoutingHostIds ) {
188
- setupMSList (nonRoutingHostId , zone .getId (), zoneHostIds , lbAlgorithm , lbCheckInterval );
188
+ setupMSList (nonRoutingHostId , zone .getId (), zoneHostIds , lbAlgorithm , globalLbCheckInterval );
189
189
}
190
190
for (Long clusterId : clusterIds ) {
191
- lbCheckInterval = getLBPreferredHostCheckInterval (clusterId );
191
+ final Long clusterLbCheckInterval = getLBPreferredHostCheckInterval (clusterId );
192
192
List <Long > hostIds = clusterHostIdsMap .get (clusterId );
193
193
for (Long hostId : hostIds ) {
194
- setupMSList (hostId , zone .getId (), zoneHostIds , lbAlgorithm , lbCheckInterval );
194
+ setupMSList (hostId , zone .getId (), zoneHostIds , lbAlgorithm , clusterLbCheckInterval );
195
195
}
196
196
}
197
197
}
0 commit comments