{"record":{"id":"94ea6ba4c330e981","repo":"kubernetes/kops","slug":"error-getting-instance-group-for-dogroup-q","errorCode":null,"errorMessage":"error getting instance group for doGroup %q","messagePattern":"error getting instance group for doGroup %q","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/do/cloud.go","lineNumber":418,"sourceCode":"\t\tNodeNames:  []string{dropletName},\n\t}, nil\n}\n\nfunc getCloudGroups(c *doCloudImplementation, cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {\n\tnodeMap := cloudinstances.GetNodeMap(nodes, cluster)\n\n\tgroups := make(map[string]*cloudinstances.CloudInstanceGroup)\n\tinstanceGroups, err := findInstanceGroups(c, cluster.ObjectMeta.Name)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"unable to find autoscale groups: %v\", err)\n\t}\n\n\tfor _, doGroup := range instanceGroups {\n\t\tname := doGroup.InstanceGroupName\n\n\t\tinstancegroup, err := matchInstanceGroup(name, cluster.ObjectMeta.Name, instancegroups)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error getting instance group for doGroup %q\", name)\n\t\t}\n\t\tif instancegroup == nil {\n\t\t\tif warnUnmatched {\n\t\t\t\tklog.Warningf(\"Found doGroup with no corresponding instance group %q\", name)\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tgroups[instancegroup.ObjectMeta.Name], err = buildCloudInstanceGroup(c, instancegroup, doGroup, nodeMap)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"error getting cloud instance group %q: %v\", instancegroup.ObjectMeta.Name, err)\n\t\t}\n\t}\n\n\tklog.V(8).Infof(\"Cloud Instance Group Info = %v\", groups)\n\treturn groups, nil\n}\n","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/do/cloud.go#L400-L436","documentation":"Wraps matchInstanceGroup failure while mapping a discovered DO droplet group to a kops InstanceGroup by name. Fires when name matching itself errors (ambiguity/malformed name) rather than simply not matching — note the underlying error is dropped, only the group name is reported.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/do/cloud.go:418 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check cluster instance group names match the <cluster>-<instancegroup> convention","Look for duplicate instance group names causing the match error","Rename conflicting instance groups and re-run"],"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"}