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
- Verify IAM permissions include ec2:DescribeVolumes and credentials are valid.
- Retry with exponential backoff on throttling errors (RequestLimitExceeded/Throttling).
- Reduce call frequency or scope DescribeVolumes with filters/tags to lower load.
- 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
- Grant ec2:DescribeVolumes in the automation role's policy.
- Serialize or rate-limit kops invocations to avoid RequestLimitExceeded.
- Use scoped DescribeVolumes calls with tag filters where possible.
- Refresh session credentials for long-running jobs (IRSA/instance roles auto-rotate).
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
- describing instance for arn %q
- error terminating instances: %v
- error describing instances: %v
- error deleting Volume %q: %v
- error describing addresses: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/e5deb9b1654d9b2b.
Report an issue: GitHub.