{"record":{"id":"16790a1426d8b140","repo":"kubernetes/kops","slug":"error-setting-the-ip-addresses-type-v","errorCode":null,"errorMessage":"error setting the IP addresses type: %v","messagePattern":"error setting the IP addresses type: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/awstasks/network_load_balancer.go","lineNumber":562,"sourceCode":"\t\t\t\tNames: []string{loadBalancerName},\n\t\t\t}\n\n\t\t\terr := elbv2.NewLoadBalancerAvailableWaiter(t.Cloud.ELBV2()).Wait(ctx, request, 15*time.Minute)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"error waiting for NLB %q: %w\", loadBalancerName, err)\n\t\t\t}\n\t\t}\n\n\t} else {\n\t\tloadBalancerArn = a.loadBalancerArn\n\n\t\tif len(changes.IpAddressType) > 0 {\n\t\t\trequest := &elbv2.SetIpAddressTypeInput{\n\t\t\t\tIpAddressType:   e.IpAddressType,\n\t\t\t\tLoadBalancerArn: &loadBalancerArn,\n\t\t\t}\n\t\t\tif _, err := t.Cloud.ELBV2().SetIpAddressType(ctx, request); err != nil {\n\t\t\t\treturn fmt.Errorf(\"error setting the IP addresses type: %v\", err)\n\t\t\t}\n\t\t}\n\n\t\tif changes.SubnetMappings != nil {\n\t\t\tactualSubnets := make(map[string]*string)\n\t\t\tfor _, s := range a.SubnetMappings {\n\t\t\t\t// actualSubnets[*s.Subnet.ID] = s\n\t\t\t\tif s.AllocationID != nil {\n\t\t\t\t\tactualSubnets[*s.Subnet.ID] = s.AllocationID\n\t\t\t\t}\n\t\t\t\tif s.PrivateIPv4Address != nil {\n\t\t\t\t\tactualSubnets[*s.Subnet.ID] = s.PrivateIPv4Address\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar awsSubnetMappings []elbv2types.SubnetMapping\n\t\t\thasChanges := false\n\t\t\tfor _, s := range e.SubnetMappings {","sourceCodeStart":544,"sourceCodeEnd":580,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/awstasks/network_load_balancer.go#L544-L580","documentation":"SetIpAddressType failed while changing an existing NLB's IP address type (e.g. ipv4 ↔ dualstack); AWS rejects the switch when subnets lack IPv6 support or the LB is in a transitional state.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/awstasks/network_load_balancer.go:562 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the spec's subnets are dualstack-capable before requesting dualstack","Retry after the NLB reaches an active state"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}