{"record":{"id":"d8d781d5952b9504","repo":"kubernetes/kops","slug":"error-parsing-akamai-linode-instance-id-q-w","errorCode":null,"errorMessage":"error parsing Akamai (Linode) instance ID %q: %w","messagePattern":"error parsing Akamai \\(Linode\\) instance ID %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/linode/cloud.go","lineNumber":125,"sourceCode":"\treturn c.client\n}\n\nfunc (c *Cloud) ProviderID() kops.CloudProviderID {\n\treturn kops.CloudProviderLinode\n}\n\nfunc (c *Cloud) DNS() (dnsprovider.Interface, error) {\n\treturn nil, fmt.Errorf(\"DNS is not yet implemented for Akamai (Linode)\")\n}\n\nfunc (c *Cloud) FindVPCInfo(id string) (*fi.VPCInfo, error) {\n\treturn nil, nil\n}\n\nfunc (c *Cloud) DeleteInstance(instance *cloudinstances.CloudInstance) error {\n\tinstanceID, err := strconv.Atoi(instance.ID)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"error parsing Akamai (Linode) instance ID %q: %w\", instance.ID, err)\n\t}\n\n\tif err := c.client.DeleteInstance(context.Background(), instanceID); err != nil {\n\t\tif linodego.IsNotFound(err) {\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"error deleting Akamai (Linode) instance %q: %w\", instance.ID, err)\n\t}\n\n\treturn nil\n}\n\nfunc (c *Cloud) DeregisterInstance(instance *cloudinstances.CloudInstance) error {\n\treturn nil\n}\n\nfunc (c *Cloud) DeleteGroup(group *cloudinstances.CloudInstanceGroup) error {\n\treturn fmt.Errorf(\"instance group deletion is not yet implemented for Akamai (Linode)\")","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/linode/cloud.go#L107-L143","documentation":"DeleteInstance parses the CloudInstance ID as an integer Linode instance ID with strconv.Atoi before calling the API. A non-numeric or empty ID produces this wrapped parse error instead of an API call.","triggerScenarios":"Rolling-update or instance deletion flows pass a CloudInstance whose ID is empty or not a numeric Linode instance ID (e.g. a label or placeholder value) into Cloud.DeleteInstance.","commonSituations":"Corrupted/partial cloud group discovery results, custom tooling that populates CloudInstance with non-Linode identifiers, or instances deleted out-of-band leaving stale entries.","solutions":["Verify the CloudInstance was built from a real Linode instance (numeric ID) by re-running `kops get instances` / cloud discovery.","Check that no custom code overrides instance IDs with labels; Linode IDs are numeric strings like '12345678'.","Run `kops rolling-update cluster` again after refreshing cluster state so the instance list is rebuilt."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"func validInstanceID(id string) bool {\n\t_, err := strconv.Atoi(id)\n\treturn err == nil\n}\nif !validInstanceID(inst.ID) {\n\treturn fmt.Errorf(\"refusing to delete: instance ID %q is not a numeric Linode ID\", inst.ID)\n}","typeGuard":"func isNumericID(s string) bool { _, err := strconv.Atoi(s); return err == nil }","tryCatchPattern":"if err := cloud.DeleteInstance(inst); err != nil {\n\tif strings.Contains(err.Error(), \"error parsing Akamai (Linode) instance ID\") {\n\t\t// refresh discovery and retry with corrected instance list\n\t}\n}","preventionTips":["Only populate CloudInstance.ID from Linode API instance IDs (numeric strings)","Re-run cloud discovery before delete/rolling-update to avoid stale entries","Never substitute labels or provider slugs for instance IDs"],"tags":["linode","akamai","instance-id","strconv"],"backgroundTag":"invalid-numeric-id","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"}