Skip to content

Commit

Permalink
Merge pull request #1350 from JacobTanenbaum/release-4.11-OCPBUGS-3115
Browse files Browse the repository at this point in the history
[release-4.11] OCPBUGS-3116: append instead of overwrite logicalSwitch other-config
  • Loading branch information
openshift-merge-robot committed Dec 15, 2022
2 parents fbc34a5 + 69d83b8 commit cf1c37f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions go-controller/pkg/ovn/master.go
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ func (oc *Controller) ensureNodeLogicalNetwork(node *kapi.Node, hostSubnets []*n
var v4Gateway, v6Gateway net.IP
var hostNetworkPolicyIPs []net.IP
logicalRouterPortNetwork := []string{}
logicalSwitch.OtherConfig = map[string]string{}
for _, hostSubnet := range hostSubnets {
gwIfAddr := util.GetNodeGatewayIfAddr(hostSubnet)
mgmtIfAddr := util.GetNodeManagementIfAddr(hostSubnet)
Expand All @@ -662,20 +663,17 @@ func (oc *Controller) ensureNodeLogicalNetwork(node *kapi.Node, hostSubnets []*n
if utilnet.IsIPv6CIDR(hostSubnet) {
v6Gateway = gwIfAddr.IP

logicalSwitch.OtherConfig = map[string]string{
"ipv6_prefix": hostSubnet.IP.String(),
}
logicalSwitch.OtherConfig["ipv6_prefix"] =
hostSubnet.IP.String()
} else {
v4Gateway = gwIfAddr.IP
excludeIPs := mgmtIfAddr.IP.String()
if config.HybridOverlay.Enabled {
hybridOverlayIfAddr := util.GetNodeHybridOverlayIfAddr(hostSubnet)
excludeIPs += ".." + hybridOverlayIfAddr.IP.String()
}
logicalSwitch.OtherConfig = map[string]string{
"subnet": hostSubnet.String(),
"exclude_ips": excludeIPs,
}
logicalSwitch.OtherConfig["subnet"] = hostSubnet.String()
logicalSwitch.OtherConfig["exclude_ips"] = excludeIPs
}
}

Expand Down

0 comments on commit cf1c37f

Please sign in to comment.