Skip to content

Commit

Permalink
Merge pull request ovn-kubernetes#4827 from tssurya/fix-panic-udn
Browse files Browse the repository at this point in the history
Fix Panic in ClusterManager: Release IDs only for Primary L2 UDNs
  • Loading branch information
trozet authored Nov 11, 2024
2 parents 9996174 + f9fa20e commit cbd41e9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions go-controller/pkg/clustermanager/node/node_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,10 @@ func (na *NodeAllocator) syncNodeNetworkAnnotations(node *corev1.Node) error {
if errR := na.clusterSubnetAllocator.ReleaseNetworks(node.Name, allocatedSubnets...); errR != nil {
klog.Warningf("Error releasing node %s subnets: %v", node.Name, errR)
}
na.idAllocator.ReleaseID(networkName + "_" + node.Name)
klog.Infof("Releasing node %s tunnelID for network %s since annotation update failed", node.Name, networkName)
if util.IsNetworkSegmentationSupportEnabled() && na.netInfo.IsPrimaryNetwork() && util.DoesNetworkRequireTunnelIDs(na.netInfo) {
na.idAllocator.ReleaseID(networkName + "_" + node.Name)
klog.Infof("Releasing node %s tunnelID for network %s since annotation update failed", node.Name, networkName)
}
return err
}
}
Expand Down

0 comments on commit cbd41e9

Please sign in to comment.