Skip to content

Commit 7cdfaa9

Browse files
addressed comments
1 parent 67ae519 commit 7cdfaa9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/src/main/java/org/apache/cloudstack/agent/lb/IndirectAgentLBServiceImpl.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ private org.apache.cloudstack.agent.lb.IndirectAgentLBAlgorithm getAgentMSLBAlgo
170170
public void propagateMSListToAgents() {
171171
logger.debug("Propagating management server list update to agents");
172172
final String lbAlgorithm = getLBAlgorithmName();
173+
final Long globalLbCheckInterval = getLBPreferredHostCheckInterval(null);
173174
List<DataCenterVO> zones = dataCenterDao.listAll();
174-
Long lbCheckInterval = getLBPreferredHostCheckInterval(null);
175175
for (DataCenterVO zone : zones) {
176176
List<Long> zoneHostIds = new ArrayList<>();
177177
List<Long> nonRoutingHostIds = getAllAgentBasedNonRoutingHostsFromDB(zone.getId());
@@ -185,13 +185,13 @@ public void propagateMSListToAgents() {
185185
}
186186
zoneHostIds.sort(Comparator.comparingLong(x -> x));
187187
for (Long nonRoutingHostId : nonRoutingHostIds) {
188-
setupMSList(nonRoutingHostId, zone.getId(), zoneHostIds, lbAlgorithm, lbCheckInterval);
188+
setupMSList(nonRoutingHostId, zone.getId(), zoneHostIds, lbAlgorithm, globalLbCheckInterval);
189189
}
190190
for (Long clusterId : clusterIds) {
191-
lbCheckInterval = getLBPreferredHostCheckInterval(clusterId);
191+
final Long clusterLbCheckInterval = getLBPreferredHostCheckInterval(clusterId);
192192
List<Long> hostIds = clusterHostIdsMap.get(clusterId);
193193
for (Long hostId : hostIds) {
194-
setupMSList(hostId, zone.getId(), zoneHostIds, lbAlgorithm, lbCheckInterval);
194+
setupMSList(hostId, zone.getId(), zoneHostIds, lbAlgorithm, clusterLbCheckInterval);
195195
}
196196
}
197197
}

0 commit comments

Comments
 (0)