{"record":{"id":"7d03c9a3dfcde36c","repo":"kubernetes/kops","slug":"could-not-get-cloud-tags-for-instance-group-s-v","errorCode":null,"errorMessage":"could not get cloud tags for instance group %s: %v","messagePattern":"could not get cloud tags for instance group (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/model/openstackmodel/servergroup.go","lineNumber":96,"sourceCode":"\tsort.Slice(allowedAddressPairs, func(i, j int) bool {\n\t\treturn allowedAddressPairs[i].IPAddress < allowedAddressPairs[j].IPAddress\n\t})\n\n\treturn allowedAddressPairs\n}\n\nfunc (b *ServerGroupModelBuilder) buildInstances(c *fi.CloudupModelBuilderContext, sg *openstacktasks.ServerGroup, ig *kops.InstanceGroup) error {\n\tsshKeyNameFull, err := b.SSHKeyName()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsshKeyName := strings.ReplaceAll(sshKeyNameFull, \":\", \"_\")\n\n\tigMeta := make(map[string]string)\n\tcloudTags, err := b.KopsModelContext.CloudTagsForInstanceGroup(ig)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get cloud tags for instance group %s: %v\", ig.Name, err)\n\t}\n\tfor label, labelVal := range cloudTags {\n\t\tsanitizedLabel := strings.ToLower(\n\t\t\tinstanceMetadataNotAllowedCharacters.ReplaceAllLiteralString(label, \"_\"),\n\t\t)\n\t\tigMeta[sanitizedLabel] = labelVal\n\t}\n\tif !ig.Spec.Role.HasBastion() {\n\t\t// Bastion does not belong to the cluster.\n\t\tigMeta[openstack.TagClusterName] = b.ClusterName()\n\t}\n\tigMeta[\"k8s\"] = b.ClusterName()\n\tnetName, err := b.GetNetworkName()\n\tif err != nil {\n\t\treturn err\n\t}\n\tigMeta[openstack.TagKopsNetwork] = netName\n\tigMeta[openstack.TagKopsInstanceGroup] = ig.Name","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/model/openstackmodel/servergroup.go#L78-L114","documentation":"Wrapped error while building OpenStack server-group instances: CloudTagsForInstanceGroup failed to derive the cloud tags (labels) for the instance group, typically because of missing cluster/IG metadata needed for tag generation. The instance group named in the message is the one being built.","triggerScenarios":"Thrown at pkg/model/openstackmodel/servergroup.go:96 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the wrapped error for the underlying cause","Ensure the instance group and cluster specs are complete (name, role, generation metadata)","Re-run `kops update cluster --target openstack` after fixing the reported metadata issue"],"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"}