{"record":{"id":"587a9ecb74e04e89","repo":"kubernetes/kops","slug":"error-deleting-akamai-linode-instance-q-w","errorCode":null,"errorMessage":"error deleting Akamai (Linode) instance %q: %w","messagePattern":"error deleting Akamai \\(Linode\\) instance %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/linode/cloud.go","lineNumber":132,"sourceCode":"func (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)\")\n}\n\nfunc (c *Cloud) DetachInstance(instance *cloudinstances.CloudInstance) error {\n\treturn fmt.Errorf(\"instance detach is not yet implemented for Akamai (Linode)\")\n}\n\nfunc (c *Cloud) GetCloudGroups(cluster *kops.Cluster, instancegroups []*kops.InstanceGroup, warnUnmatched bool, nodes []v1.Node) (map[string]*cloudinstances.CloudInstanceGroup, error) {","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/linode/cloud.go#L114-L150","documentation":"After successfully parsing the instance ID, DeleteInstance calls the Linode API DeleteInstance. Any API error other than a 404 (which is treated as success) is wrapped as 'error deleting Akamai (Linode) instance %q: %w'.","triggerScenarios":"The linodego client's DeleteInstance call fails — invalid/expired token, insufficient token scopes, instance in a state that forbids deletion, or network/API outage.","commonSituations":"Expired or revoked LINODE_TOKEN during rolling updates; token lacking linodes:read_write scope; temporary Linode API 5xx outages during cluster upgrades.","solutions":["Inspect the wrapped cause (kops -v=10) to see the Linode API status code; fix auth if 401/403 by refreshing LINODE_TOKEN with linodes read/write scopes.","Retry the operation if the error is transient (429/5xx) — kops rolling-update can be re-run safely.","Verify the instance still exists in the Akamai Cloud Manager and is not already being deleted; stale entries can be cleared by re-running discovery."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if os.Getenv(\"LINODE_TOKEN\") == \"\" { return fmt.Errorf(\"set LINODE_TOKEN before deleting instances\") }","typeGuard":null,"tryCatchPattern":"err := cloud.DeleteInstance(inst)\nif err != nil && !strings.Contains(err.Error(), \"not found\") {\n\tif isTransient(err) { // 429/5xx\n\t\ttime.Sleep(backoff)\n\t\tretry(cloud.DeleteInstance, inst)\n\t}\n}","preventionTips":["Use a token with linodes read/write scope and sufficient expiry","Retry rolling-update on transient Linode API 429/5xx errors with backoff","Confirm instances exist in the Cloud Manager before automated deletion runs"],"tags":["linode","akamai","api-error","instance-deletion"],"backgroundTag":"cloud-api-request-failed","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"}