From a5c1f4d3b55df8ec3d13ff74d08ad6ae974b8078 Mon Sep 17 00:00:00 2001 From: Yuan Liu Date: Tue, 26 Nov 2024 14:35:04 -0800 Subject: [PATCH] add log when a network is skipped due to network-status --- .../nodeipam/ipam/multinetwork_cloud_cidr_allocator.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/controller/nodeipam/ipam/multinetwork_cloud_cidr_allocator.go b/pkg/controller/nodeipam/ipam/multinetwork_cloud_cidr_allocator.go index 4a04aab27..7dbce68b0 100644 --- a/pkg/controller/nodeipam/ipam/multinetwork_cloud_cidr_allocator.go +++ b/pkg/controller/nodeipam/ipam/multinetwork_cloud_cidr_allocator.go @@ -99,6 +99,8 @@ func (ca *cloudCIDRAllocator) performMultiNetworkCIDRAllocation(node *v1.Node, i northInterfaces = append(northInterfaces, networkv1.NorthInterface{Network: network.Name, IpAddress: inf.NetworkIP}) if _, ok := upStatusNetworks[network.Name]; ok { additionalNodeNetworks = append(additionalNodeNetworks, networkv1.NodeNetwork{Name: network.Name, Scope: "host-local", Cidrs: []string{inf.NetworkIP + "/32"}}) + } else { + klog.V(2).InfoS("skipping network %s on node %s in networking.gke.io/networks annotation due to missing network-status", network.Name, node.Name) } continue } @@ -136,6 +138,8 @@ func (ca *cloudCIDRAllocator) performMultiNetworkCIDRAllocation(node *v1.Node, i northInterfaces = append(northInterfaces, networkv1.NorthInterface{Network: network.Name, IpAddress: inf.NetworkIP}) if _, ok := upStatusNetworks[network.Name]; ok { additionalNodeNetworks = append(additionalNodeNetworks, networkv1.NodeNetwork{Name: network.Name, Scope: "host-local", Cidrs: []string{ipRange.IpCidrRange}}) + } else { + klog.V(2).InfoS("skipping network %s on node %s in networking.gke.io/networks annotation due to missing network-status", network.Name, node.Name) } } break