Damans227 commented on code in PR #14324:
URL: https://github.com/apache/cloudstack/pull/14324#discussion_r4271412274
##########
engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java:
##########
@@ -2284,6 +2291,24 @@ public void propagateChangeToAgents(Map<String, String>
params) {
}
}
+ @Override
+ public void propagateSystemTrafficLabelsToAgents(long zoneId) {
+ final Map<String, String> params = new HashMap<>();
+ params.put(SetHostParamsCommand.SYSTEM_TRAFFIC_LABELS,
String.join(",", _physicalNetworkDao.getKvmNetworkLabelsInZone(zoneId)));
+
+ final List<HostVO> hosts =
_resourceMgr.listAllUpAndEnabledHostsInOneZoneByType(Host.Type.Routing, zoneId);
Review Comment:
should this also send to disabled hosts? they can still have running vms, so
they keep the old list until they reconnect and can still remove the bridge
##########
engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java:
##########
@@ -2284,6 +2291,24 @@ public void propagateChangeToAgents(Map<String, String>
params) {
}
}
+ @Override
+ public void propagateSystemTrafficLabelsToAgents(long zoneId) {
+ final Map<String, String> params = new HashMap<>();
+ params.put(SetHostParamsCommand.SYSTEM_TRAFFIC_LABELS,
String.join(",", _physicalNetworkDao.getKvmNetworkLabelsInZone(zoneId)));
+
+ final List<HostVO> hosts =
_resourceMgr.listAllUpAndEnabledHostsInOneZoneByType(Host.Type.Routing, zoneId);
+ for (final HostVO host : hosts) {
+ if (host.getHypervisorType() != HypervisorType.KVM) {
+ continue;
+ }
+ try {
+ easySend(host.getId(), new SetHostParamsCommand(params));
Review Comment:
can we log when a host doesnt get the new list? the send returns nothing on
failure instead of throwing, so this catch never runs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]