kubernetes/kops · error

error describing volumes: %v

Error message

error describing volumes: %v

What it means

DescribeVolumes pages through ec2:DescribeVolumes using the AWS SDK v2 paginator and wraps any page-fetch error in this error. It means the EC2 API failed mid-enumeration of volumes, aborting the listing. The raw AWS error is embedded via %v.

Source

Thrown at pkg/resources/aws/aws.go:665

	return resourceTrackers, nil
}

func DescribeVolumes(cloud fi.Cloud) ([]ec2types.Volume, error) {
	ctx := context.TODO()
	c := cloud.(awsup.AWSCloud)

	var volumes []ec2types.Volume

	klog.V(2).Infof("Listing EC2 Volumes")
	request := &ec2.DescribeVolumesInput{
		Filters: BuildEC2Filters(c),
	}

	paginator := ec2.NewDescribeVolumesPaginator(c.EC2(), request)
	for paginator.HasMorePages() {
		page, err := paginator.NextPage(ctx)
		if err != nil {
			return nil, fmt.Errorf("error describing volumes: %v", err)
		}
		volumes = append(volumes, page.Volumes...)
	}

	return volumes, nil
}

func DeleteKeypair(cloud fi.Cloud, r *resources.Resource) error {
	ctx := context.TODO()
	c := cloud.(awsup.AWSCloud)

	id := r.ID

	klog.V(2).Infof("Deleting EC2 Keypair %q", id)
	request := &ec2.DeleteKeyPairInput{
		KeyPairId: &id,
	}
	_, err := c.EC2().DeleteKeyPair(ctx, request)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify IAM permissions include ec2:DescribeVolumes and credentials are valid.
  2. Retry with exponential backoff on throttling errors (RequestLimitExceeded/Throttling).
  3. Reduce call frequency or scope DescribeVolumes with filters/tags to lower load.
  4. Check AWS health and regional endpoint connectivity.
Defensive patterns

Strategy: retry

Validate before calling

if _, err := stsClient.GetCallerIdentity(ctx, &sts.GetCallerIdentityInput{}); err != nil { return fmt.Errorf("AWS auth failed: %w", err) }

Type guard

func isThrottling(err error) bool { var ae smithy.APIError; return errors.As(err, &ae) && (ae.ErrorCode() == "RequestLimitExceeded" || ae.ErrorCode() == "Throttling" || ae.ErrorCode() == "ThrottlingException") }

Try / catch

err := retry.Do(func() error { _, err := DescribeVolumes(ctx, req); return err }, retry.Attempts(5), retry.BackOffDelay)
if err != nil { return fmt.Errorf("DescribeVolumes failed after retries: %w", err) }

Prevention

When it happens

Trigger: Any NextPage call of the DescribeVolumes paginator fails: UnauthorizedOperation/AuthFailure, RequestLimitExceeded throttling, invalid credentials, or network/endpoint errors while paging.

Common situations: IAM role missing ec2:DescribeVolumes; large accounts hitting EC2 rate limits during repeated kops get/cluster listings; expired session tokens on long-running tooling; transient AWS outage.

Related errors


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