From 2de03cac756c34b45ebd85716f78ec591a71e7d5 Mon Sep 17 00:00:00 2001 From: Jean Chen Date: Fri, 24 Jul 2026 14:40:24 -0400 Subject: [PATCH] DNM: log first IPv6 CIDR association entry for debugging Add a temporary klog.Infof in getSubnet to print the first entry in Ipv6CidrBlockAssociationSet (CIDR value and state) so we can observe whether the old code was picking a stale 'disassociated' entry. This is an experimental/diagnostic-only commit and should not be merged. Signed-off-by: Jean Chen Co-authored-by: Cursor --- pkg/cloudprovider/aws.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/cloudprovider/aws.go b/pkg/cloudprovider/aws.go index 44deb2c65..8605c1d63 100644 --- a/pkg/cloudprovider/aws.go +++ b/pkg/cloudprovider/aws.go @@ -287,6 +287,12 @@ func (a *AWS) getSubnet(networkInterface *ec2.InstanceNetworkInterface) (*net.IP // one subnet, specially given that you can only have one IPv4 CIDR block // defined...¯\_(ツ)_/¯ // Let's just pick the first. + if len(subnet.Ipv6CidrBlockAssociationSet) > 0 { + klog.Infof("getSubnet: subnet %s first IPv6 CIDR association: cidr=%s state=%s", + awsapi.StringValue(networkInterface.SubnetId), + awsapi.StringValue(subnet.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock), + awsapi.StringValue(subnet.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlockState.State)) + } if len(subnet.Ipv6CidrBlockAssociationSet) > 0 && subnet.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock != nil && *subnet.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock != "" { _, subnet, err := net.ParseCIDR(*subnet.Ipv6CidrBlockAssociationSet[0].Ipv6CidrBlock) if err != nil {