{"record":{"id":"c04504c738f10ea1","repo":"kubernetes/kops","slug":"error-listing-akamai-linode-interfaces-for-insta","errorCode":null,"errorMessage":"error listing Akamai (Linode) interfaces for instance %s(%d): %w","messagePattern":"error listing Akamai \\(Linode\\) interfaces for instance (.+?)\\((.+?)\\): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/resources/linode/resources.go","lineNumber":144,"sourceCode":"\t\t\tName:    volume.Label,\n\t\t\tID:      strconv.Itoa(volume.ID),\n\t\t\tType:    resourceTypeVolume,\n\t\t\tDeleter: deleteVolume,\n\t\t\tObj:     volume,\n\t\t}\n\t\tif volume.LinodeID != nil {\n\t\t\tresourceTracker.Blocked = []string{resourceTypeInstance + \":\" + strconv.Itoa(*volume.LinodeID)}\n\t\t}\n\t\tresourceTrackers = append(resourceTrackers, resourceTracker)\n\t}\n\n\treturn resourceTrackers, nil\n}\n\nfunc instanceSubnetBlocks(cloud cloudlinode.LinodeCloud, instance linodego.Instance) ([]string, error) {\n\tinterfaces, err := cloud.Client().ListInterfaces(context.Background(), instance.ID, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"error listing Akamai (Linode) interfaces for instance %s(%d): %w\", instance.Label, instance.ID, err)\n\t}\n\n\tblockSet := make(map[string]struct{})\n\tfor _, iface := range interfaces {\n\t\tif iface.VPC == nil {\n\t\t\tcontinue\n\t\t}\n\t\tblockSet[resourceTypeSubnet+\":\"+strconv.Itoa(iface.VPC.SubnetID)] = struct{}{}\n\t}\n\n\tblocks := make([]string, 0, len(blockSet))\n\tfor block := range blockSet {\n\t\tblocks = append(blocks, block)\n\t}\n\tsort.Strings(blocks)\n\n\treturn blocks, nil\n}","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/pkg/resources/linode/resources.go#L126-L162","documentation":"instanceSubnetBlocks in kOps' Akamai (Linode) code lists a Linode instance's network interfaces to extract VPC subnet blocks. This error wraps a ListInterfaces failure, identifying the instance by label and numeric ID, and aborts listInstances (so instance discovery fails).","triggerScenarios":"cloud.Client().ListInterfaces(ctx, instance.ID, nil) errors: token lacks VPC/interface read scopes, instance deleted between listing and interface fetch (404), rate limit, or API outage.","commonSituations":"Concurrent teardown deleting the instance while ListInterfaces is in flight; older API tokens without VPC permissions; heavy delete loops hitting Linode rate limits.","solutions":["Verify the Linode token includes VPC/network interface read permissions.","If the wrapped error is 404, the instance vanished mid-listing — rerun; the refreshed instance list will exclude it.","Reduce concurrency or retry after the rate-limit window.","Check Linode API availability, then rerun `kops delete cluster` / dump."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// confirm instance still exists before listing its interfaces\ninst, err := c.Client().GetInstance(ctx, instance.ID)\nif err != nil || inst == nil {\n    return nil // instance gone; nothing to enumerate\n}","typeGuard":"func isLinodeNotFound(err error) bool {\n    var le linodego.Error\n    return errors.As(err, &le) && le.Code == 404\n}","tryCatchPattern":"ifaces, err := cloud.Client().ListInterfaces(ctx, instance.ID, nil)\nif err != nil {\n    if isLinodeNotFound(err) {\n        return nil, nil // deleted concurrently; skip\n    }\n    return nil, fmt.Errorf(\"error listing Akamai (Linode) interfaces for instance %s(%d): %w\", instance.Label, instance.ID, err)\n}","preventionTips":["Avoid concurrent manual deletion of Linode instances while kOps enumerates resources.","Ensure the token has VPC/interface read scope (older tokens may not).","Treat 404s as already-deleted rather than fatal.","Rate-limit interface listing when many instances are present."],"tags":["linode","akamai","network-interfaces","api-listing"],"backgroundTag":"cloud-api-list-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"}