kubernetes/kops · error

error listing Akamai (Linode) interfaces for instance %q: %w

Error message

error listing Akamai (Linode) interfaces for instance %q: %w

What it means

During Find, after the subnet check, the task lists the network interfaces of each existing instance via cloud.Client().ListInterfaces(ctx, instanceID, nil) to decide whether interfaces match expectations. Any API error is wrapped as 'error listing Akamai (Linode) interfaces for instance %q: %w' with the instance label. This means reconciliation could not inspect the instance's networking configuration.

Source

Thrown at upup/pkg/fi/cloudup/linodetasks/instance.go:128

		}
		if instance.Image != i.Image {
			needsUpdate = append(needsUpdate, instance.Label)
			continue
		}
		if instance.Region != i.Region {
			needsUpdate = append(needsUpdate, instance.Label)
			continue
		}
		if !hasAllTags(instance.Tags, expectedTags) {
			needsUpdate = append(needsUpdate, instance.Label)
			continue
		}
		if i.Subnet == nil || i.Subnet.ID == nil {
			return nil, fmt.Errorf("Subnet.ID is required")
		}
		interfaces, err := cloud.Client().ListInterfaces(c.Context(), instance.ID, nil)
		if err != nil {
			return nil, fmt.Errorf("error listing Akamai (Linode) interfaces for instance %q: %w", instance.Label, err)
		}
		if !hasExpectedInterfaces(interfaces, fi.ValueOf(i.Subnet.ID), fi.ValueOf(i.RequirePublicInterface)) {
			needsUpdate = append(needsUpdate, instance.Label)
			continue
		}
	}

	actual := *i
	actual.NeedsUpdate = needsUpdate
	actual.Count = len(instances)

	return &actual, nil
}

func (i *Instance) Run(c *fi.CloudupContext) error {
	return fi.CloudupDefaultDeltaRunMethod(i, c)
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check the wrapped error: 401/403 => fix LINODE_TOKEN scopes; 404 => instance vanished, re-run reconciliation; 429 => back off and retry
  2. Verify outbound connectivity from the controller to api.linode.com
  3. Retry the kops apply/reconcile; the error is often transient
  4. Reduce reconciliation concurrency or add backoff if rate-limited on large clusters
  5. Confirm the instance still exists in the Linode account (linode-cli linodes list)
Defensive patterns

Strategy: retry

Validate before calling

// ensure credentials and connectivity before reconcile
if os.Getenv("LINODE_TOKEN") == "" { return errors.New("LINODE_TOKEN not set") }
if err := checkAPIReachable(ctx); err != nil { return err }

Try / catch

ifaces, err := cloud.Client().ListInterfaces(ctx, instanceID, nil)
if err != nil {
	var apiErr *linodego.Error
	if errors.As(err, &apiErr) && (apiErr.Code == 429 || apiErr.Code >= 500) {
		return retryWithBackoff(err)
	}
	return fmt.Errorf("error listing Akamai (Linode) interfaces for instance %q: %w", label, err)
}

Prevention

When it happens

Trigger: ListInterfaces returns an error: LINODE_TOKEN lacks read scope on the instance, the instance was deleted concurrently (404), API rate limiting (429), network failure to api.linode.com, or SDK paging error.

Common situations: Rotated/restricted API token without linodes:read scope; instance terminated by autoscaling between list and interface query; transient Linode API outage; hitting API rate limits on clusters with many instances during reconciliation.

Understand the failure class

Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/caf8f7936ab0be62. Report an issue: GitHub.