kubernetes/kops · error

missing instance id

Error message

missing instance id

What it means

The provider ID carried the linode:// prefix but no numeric instance ID remained after trimming the prefix and any region path segment. The string parsed as a linode-shaped ID but contained no usable instance number.

Source

Thrown at pkg/nodeidentity/linode/identify.go:132

		if err := i.cache.Add(info); err != nil {
			klog.Warningf("Failed to add node identity info to cache: %v", err)
		}
	}

	return info, nil
}

// parseInstanceIDFromProviderID extracts the numeric instance ID and string ID from a provider ID.
// It supports formats like "linode://123", "linode:///123", and "linode://region/123".
func parseInstanceIDFromProviderID(providerID string) (int, string, error) {
	if !strings.HasPrefix(providerID, providerIDPrefix) {
		return 0, "", fmt.Errorf("missing prefix %q", providerIDPrefix)
	}

	raw := strings.TrimPrefix(providerID, providerIDPrefix)
	raw = strings.Trim(raw, "/")
	if raw == "" {
		return 0, "", fmt.Errorf("missing instance id")
	}

	parts := strings.Split(raw, "/")
	instanceID := parts[len(parts)-1]
	if instanceID == "" {
		return 0, "", fmt.Errorf("missing instance id")
	}

	linodeID, err := strconv.Atoi(instanceID)
	if err != nil {
		return 0, "", fmt.Errorf("invalid instance id %q: %w", instanceID, err)
	}

	return linodeID, instanceID, nil
}

// isExpectedInstanceStatus returns true if the instance is in a state where it can be identified.
func isExpectedInstanceStatus(status linodego.InstanceStatus) bool {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Correct the provider ID to include the numeric instance ID (e.g. linode://12345)
  2. Check for truncated or hand-edited providerID values
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at pkg/nodeidentity/linode/identify.go:132 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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