{"record":{"id":"5230c3e3940268c5","repo":"kubernetes/kops","slug":"providerid-q-not-recognized-for-node-s-5230c3","errorCode":null,"errorMessage":"providerID %q not recognized for node %s","messagePattern":"providerID %q not recognized for node (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/hetzner/identify.go","lineNumber":75,"sourceCode":"\t\thcloud.WithApplication(\"kops\", version.Version),\n\t}\n\thcloudClient := hcloud.NewClient(opts...)\n\n\treturn &nodeIdentifier{\n\t\tclient:       hcloudClient,\n\t\tcache:        expirationcache.NewTTLStore(stringKeyFunc, cacheTTL),\n\t\tcacheEnabled: cacheNodeidentityInfo,\n\t}, nil\n}\n\n// IdentifyNode queries Hetzner Cloud for the node identity information\nfunc (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*nodeidentity.Info, error) {\n\tproviderID := node.Spec.ProviderID\n\tif providerID == \"\" {\n\t\treturn nil, fmt.Errorf(\"providerID not set for node %s\", node.Name)\n\t}\n\tif !strings.HasPrefix(providerID, \"hcloud://\") {\n\t\treturn nil, fmt.Errorf(\"providerID %q not recognized for node %s\", providerID, node.Name)\n\t}\n\n\tserverID := strings.TrimPrefix(providerID, \"hcloud://\")\n\n\t// If caching is enabled try pulling nodeidentity.Info from cache before doing a Hetzner Cloud API call.\n\tif i.cacheEnabled {\n\t\tobj, exists, err := i.cache.GetByKey(serverID)\n\t\tif err != nil {\n\t\t\tklog.Warningf(\"Nodeidentity info cache lookup failure: %v\", err)\n\t\t}\n\t\tif exists {\n\t\t\treturn obj.(*nodeidentity.Info), nil\n\t\t}\n\t}\n\n\tserver, err := i.getServer(serverID)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/hetzner/identify.go#L57-L93","documentation":"The Node's providerID is set but does not use the Hetzner 'hcloud://' scheme, so the Hetzner identifier cannot extract a server ID from it. This guards against Nodes from other clouds or malformed provider IDs reaching the Hetzner lookup path.","triggerScenarios":"!strings.HasPrefix(providerID, \"hcloud://\") — e.g. providerID is 'aws:///...', 'gce://...', or a bare server ID without the prefix, for a Node routed to the Hetzner identifier.","commonSituations":"Cluster migrated from another cloud and Nodes not recycled; hand-edited providerID; multiple cloud providers present in one cluster; older kubelet/cloud-controller versions emitting a different format.","solutions":["Fix the Node's providerID to hcloud://<numeric-server-id>","Recycle Nodes created under a different cloud so they re-register with hcloud:// IDs","Verify the correct cloud provider is configured in the kops cluster spec","If an external CCM writes another format, align the CCM version with kops' expectations"],"exampleFix":"// before\nproviderID: aws:///eu-central-1a/i-0abc123\n// after\nproviderID: hcloud://12345678","handlingStrategy":"validation","validationCode":"if !strings.HasPrefix(node.Spec.ProviderID, \"hcloud://\") { /* route to correct cloud handler */ }","typeGuard":"func isHcloudProviderID(n *corev1.Node) bool {\n  return n != nil && strings.HasPrefix(n.Spec.ProviderID, \"hcloud://\")\n}","tryCatchPattern":"info, err := IdentifyNode(ctx, node)\nif err != nil && strings.Contains(err.Error(), \"not recognized\") {\n  // node from another cloud or malformed: skip\n}","preventionTips":["One cloud provider per cluster; recycle migrated Nodes","Never hand-edit spec.providerID","Verify CCM version matches kops expectations"],"tags":["hetzner","provider-id","format-validation"],"backgroundTag":"invalid-provider-id-format","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}