kubernetes/kops · error

provider ID number cannot be empty

Error message

provider ID number cannot be empty

What it means

Wraps a failure of the DescribeAutoScalingGroups paginator in FindAutoscalingGroups. After collecting candidate ASG names from tags, kOps pages through group details and re-verifies tags with matchesAsgTags (the tag filter is inexact). Any API page error is wrapped here.

Source

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

	return string(bodyBytes), nil
}

// IdentifyNode queries DigitalOcean for the node identity information.
func (i *nodeIdentifier) IdentifyNode(ctx context.Context, node *corev1.Node) (*nodeidentity.Info, error) {
	providerID := node.Spec.ProviderID
	if providerID == "" {
		return nil, errors.New("provider ID cannot be empty")
	}

	const prefix = "digitalocean://"
	if !strings.HasPrefix(providerID, prefix) {
		return nil, fmt.Errorf("provider ID %q is missing prefix %q", providerID, prefix)
	}

	instanceID := strings.TrimPrefix(providerID, prefix)
	if instanceID == "" {
		return nil, errors.New("provider ID number cannot be empty")
	}

	if i.cacheEnabled {
		if obj, exists, err := i.cache.GetByKey(instanceID); err != nil {
			klog.Warningf("Nodeidentity info cache lookup failure: %v", err)
		} else if exists {
			return obj.(*nodeidentity.Info), nil
		}
	}

	dropletID, err := strconv.Atoi(instanceID)
	if err != nil {
		return nil, fmt.Errorf("failed to convert provider ID number %q: %s", instanceID, err)
	}

	droplet, _, err := i.doClient.Droplets.Get(ctx, dropletID)
	if err != nil {
		return nil, fmt.Errorf("failed to retrieve droplet %d: %w", dropletID, err)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Grant autoscaling:DescribeAutoScalingGroups to the kOps IAM role
  2. Retry; throttling errors include request IDs and resolve with backoff
  3. Confirm credentials with `aws sts get-caller-identity`
  4. Run `aws autoscaling describe-auto-scaling-groups` manually to confirm access
Defensive patterns

Strategy: retry

Validate before calling

_, err := client.DescribeAutoScalingGroups(ctx, &autoscaling.DescribeAutoScalingGroupsInput{MaxRecords: aws.Int32(1)})
if err != nil { return fmt.Errorf("DescribeAutoScalingGroups unavailable: %w", err) }

Try / catch

err := cloud.GetCloudGroups(ctx, cluster, igs, true, nodes)
if strings.Contains(err.Error(), "error listing autoscaling groups") {
  if isAuthError(err) { refreshCredentials() } else { retryWithBackoff() }
}

Prevention

When it happens

Trigger: DescribeAutoScalingGroups NextPage fails: missing autoscaling:DescribeAutoScalingGroups permission, throttling on clusters with many ASGs, or regional endpoint/network failure.

Common situations: Large clusters with dozens of ASGs hitting AWS rate limits during rolling update; IAM role lacking describe permissions; stale credentials/expired session.

Related errors


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