{"record":{"id":"44c0d18f08c0c4f3","repo":"kubernetes/kops","slug":"found-instance-q-with-unexpected-status-q","errorCode":null,"errorMessage":"found instance %q with unexpected status: %q","messagePattern":"found instance %q with unexpected status: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/nodeidentity/linode/identify.go","lineNumber":105,"sourceCode":"\t\tobj, exists, err := i.cache.GetByKey(instanceID)\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\tinstance, err := i.client.GetInstance(ctx, instanceNumericID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get info for Akamai (Linode) instance %q: %w\", instanceID, err)\n\t}\n\tif instance == nil {\n\t\treturn nil, fmt.Errorf(\"failed to get info for Akamai (Linode) instance %q: empty response\", instanceID)\n\t}\n\n\tif !isExpectedInstanceStatus(instance.Status) {\n\t\treturn nil, fmt.Errorf(\"found instance %q with unexpected status: %q\", instanceID, instance.Status)\n\t}\n\n\tinfo := &nodeidentity.Info{\n\t\tInstanceID: instanceID,\n\t\tLabels:     buildLabelsFromTags(instance.Tags),\n\t}\n\n\tif i.cacheEnabled {\n\t\tif err := i.cache.Add(info); err != nil {\n\t\t\tklog.Warningf(\"Failed to add node identity info to cache: %v\", err)\n\t\t}\n\t}\n\n\treturn info, nil\n}\n\n// parseInstanceIDFromProviderID extracts the numeric instance ID and string ID from a provider ID.\n// It supports formats like \"linode://123\", \"linode:///123\", and \"linode://region/123\".","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/nodeidentity/linode/identify.go#L87-L123","documentation":"IdentifyNode rejects instances whose Linode status is not one of the expected provisioning/running states (checked via isExpectedInstanceStatus). A node in an unexpected state (e.g. shutting down, deleted, or maintenance) cannot be reliably identified, so the lookup fails until the instance reaches an expected state. Common situations: the Linode is being deleted while nodeup still runs; a rebuild/migration leaves it in a transitional state; a stale cache entry points to a dead instance. Solutions: check the instance's status in the Linode/Akamai console or via `linode-cli linodes view <id>`; wait for the instance to reach a running/provisioning state and retry; if the instance is deleted, remove the Node object from the cluster; verify isExpectedInstanceStatus covers any new status values introduced by the provider; ensure the node's providerID maps to the correct instance ID.","triggerScenarios":"Thrown at pkg/nodeidentity/linode/identify.go:105 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the instance in the Akamai Cloud console or `linode-cli linodes view <id>` to see its actual status and event/error logs","Verify nodeup/kubelet are not crash-looping (insufficient memory, bad userdata) and that the Linode finished provisioning","If the instance is stuck in a transitional state (booting, rebuilding, migrating), wait for it to settle or delete the node so kOps can replace it","If the status cache is stale, restart the node/kops-controller so IdentifyNode re-queries the Linode API"],"exampleFix":null,"handlingStrategy":"validation","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"}