{"record":{"id":"5e07e5a02ec78543","repo":"kubernetes/kops","slug":"ip-version-is-incorrect","errorCode":null,"errorMessage":"IP version is incorrect","messagePattern":"IP version is incorrect","errorType":"validation","errorClass":"field.ErrorList (field.InternalError)","httpStatus":null,"severity":"error","filePath":"pkg/apis/kops/validation/validation.go","lineNumber":1917,"sourceCode":"\tcase \"can-reach\":\n\t\tdestStr := method[1]\n\t\tip := netutils.ParseIPSloppy(destStr)\n\t\tswitch version {\n\t\tcase ipv4.Version:\n\t\t\tif ip == nil || ip.To4() == nil {\n\t\t\t\treturn field.ErrorList{field.Invalid(fldPath, runtime, \"must be a valid IPv4 address\")}\n\t\t\t} else {\n\t\t\t\treturn nil\n\t\t\t}\n\t\tcase ipv6.Version:\n\t\t\tif ip == nil || ip.To4() != nil {\n\t\t\t\treturn field.ErrorList{field.Invalid(fldPath, runtime, \"must be a valid IPv6 address\")}\n\t\t\t} else {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t}\n\n\t\treturn field.ErrorList{field.InternalError(fldPath, errors.New(\"IP version is incorrect\"))}\n\tcase \"interface\":\n\t\tifRegexes := regexp.MustCompile(`\\s*,\\s*`).Split(method[1], -1)\n\t\tif len(ifRegexes) == 0 || ifRegexes[0] == \"\" {\n\t\t\tvalidationError = append(validationError, field.Invalid(fldPath, runtime, \"'interface=' must be followed by a comma separated list of interface regular expressions\"))\n\t\t}\n\t\tfor _, r := range ifRegexes {\n\t\t\t_, e := regexp.Compile(r)\n\t\t\tif e != nil {\n\t\t\t\tvalidationError = append(validationError, field.Invalid(fldPath, runtime, fmt.Sprintf(\"regexp %s does not compile: %s\", r, e.Error())))\n\t\t\t}\n\t\t}\n\t\treturn validationError\n\tcase \"skip-interface\":\n\t\tifRegexes := regexp.MustCompile(`\\s*,\\s*`).Split(method[1], -1)\n\t\tif len(ifRegexes) == 0 || ifRegexes[0] == \"\" {\n\t\t\tvalidationError = append(validationError, field.Invalid(fldPath, runtime, \"'skip-interface=' must be followed by a comma separated list of interface regular expressions\"))\n\t\t}\n\t\tfor _, r := range ifRegexes {","sourceCodeStart":1899,"sourceCodeEnd":1935,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/apis/kops/validation/validation.go#L1899-L1935","documentation":"Wraps failure of FindAutoscalingGroups in getCloudGroups. kOps enumerates all ASGs matching the cluster tags (via DescribeTags/DescribeAutoScalingGroups) to map cloud groups to kops instance groups. Any SDK error during discovery is wrapped with this message.","triggerScenarios":"Calling GetCloudGroups (rolling-update list, validate, delete) when the autoscaling DescribeTags/DescribeAutoScalingGroups APIs fail: credentials missing autoscaling:Describe* permissions, throttling, region misconfiguration, or network outage.","commonSituations":"Locked-down IAM roles missing autoscaling:DescribeTags; AWS rate limiting on clusters with many ASGs; wrong AWS region in kops cluster config; VPC endpoint or proxy outage.","solutions":["Grant the kOps IAM role autoscaling:DescribeTags and autoscaling:DescribeAutoScalingGroups","Retry — throttling on large clusters is transient","Verify the cluster's region/network reachability to the AWS autoscaling endpoint","Run `aws autoscaling describe-tags --region <region>` manually to confirm API access"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"_, err := client.DescribeAutoScalingGroups(ctx, &autoscaling.DescribeAutoScalingGroupsInput{MaxRecords: aws.Int32(1)})\nif err != nil { return fmt.Errorf(\"autoscaling API unreachable: %w\", err) }","typeGuard":null,"tryCatchPattern":"groups, err := cloud.GetCloudGroups(ctx, cluster, igs, true, nodes)\nif err != nil && strings.Contains(err.Error(), \"unable to find autoscale groups\") {\n  if isThrottle(err) { retryWithBackoff() } else { checkIAMAndRegion(err) }\n}","preventionTips":["Include autoscaling:DescribeTags and DescribeAutoScalingGroups in the IAM policy","Pin the correct region in the kops cluster spec","Pre-warm/backoff on throttling for large clusters","Test API access with aws CLI before running kops operations"],"tags":["aws","autoscaling","discovery","iam"],"backgroundTag":"aws-api-error-wrapped","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"}