kubernetes/kops · error
error creating Akamai (Linode) volume %q: %w
Error message
error creating Akamai (Linode) volume %q: %w
What it means
This error wraps a failure from the Linode API CreateVolume call when RenderLinode needs to provision a new block-storage volume that Find() could not locate. The task's own pre-checks (Name/Region/SizeGB required, min 10 GB) have already passed, so the failure comes from the Linode API itself - quota, invalid region, label conflict, or transient error - and is preserved via %w.
Source
Thrown at upup/pkg/fi/cloudup/linodetasks/volume.go:147
return nil
}
if err := t.Cloud.Client().ResizeVolume(context.Background(), fi.ValueOf(actual.ID), linodego.VolumeResizeOptions{Size: fi.ValueOf(expected.SizeGB)}); err != nil {
return fmt.Errorf("error resizing Akamai (Linode) volume %q: %w", fi.ValueOf(actual.Name), err)
}
klog.V(2).Infof("Resized Akamai (Linode) volume %q (id=%d) to %d GB", fi.ValueOf(actual.Name), fi.ValueOf(actual.ID), fi.ValueOf(expected.SizeGB))
return nil
}
name := fi.ValueOf(expected.Name)
label := truncate.TruncateString(linode.NormalizeLinodeLabel(name), truncate.TruncateStringOptions{MaxLength: 32})
created, err := t.Cloud.Client().CreateVolume(context.Background(), linodego.VolumeCreateOptions{
Label: label,
Region: fi.ValueOf(expected.Region),
Size: fi.ValueOf(expected.SizeGB),
Tags: expected.Tags,
})
if err != nil {
return fmt.Errorf("error creating Akamai (Linode) volume %q: %w", name, err)
}
expected.ID = new(created.ID)
klog.V(2).Infof("Created Akamai (Linode) volume %q (id=%d)", created.Label, created.ID)
return nil
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Check the wrapped linodego error for quota/limit messages and delete unused volumes or request a quota increase
- Verify the Region in the cluster spec is a valid Linode region with volume availability
- Ensure the volume Name is unique and <= 32 characters after NormalizeLinodeLabel/TruncateString so Find() can locate an existing volume instead of creating a duplicate
- Confirm the API token is valid and has volumes:read_write scope
- Retry on transient 5xx errors; kops will re-run the task
Example fix
// before: ambiguous long name silently truncated, Find misses existing volume name: "my-very-long-volume-name-that-exceeds-32-characters" // after: short unique name that round-trips through NormalizeLinodeLabel name: "my-cluster-data-vol1"
Defensive patterns
Strategy: validation
Validate before calling
func validateVolumeCreate(name, region string, sizeGB int) error {
if len(name) == 0 || len(name) > 32 {
return fmt.Errorf("volume name %q must be 1-32 chars to survive label truncation", name)
}
if sizeGB < 10 || sizeGB > 10240 {
return fmt.Errorf("SizeGB %d out of allowed range 10-10240", sizeGB)
}
if region == "" {
return fmt.Errorf("region is required")
}
return nil
} Type guard
func isQuotaError(err error) bool {
var apiErr *linodego.Error
return errors.As(err, &apiErr) && (apiErr.Code == 400 || apiErr.Code == 452) &&
strings.Contains(strings.ToLower(apiErr.Message), "limit")
} Try / catch
if err := run(); err != nil {
var apiErr *linodego.Error
if errors.As(err, &apiErr) {
switch apiErr.Code {
case 401, 403:
return fmt.Errorf("check LINODE_TOKEN scopes: %w", err)
case 429:
return fmt.Errorf("rate limited, retry later: %w", err)
}
}
return err
} Prevention
- Keep volume names short (<=32 chars) and unique per account/region
- Verify the region string against `linode-cli regions list` before bring-up
- Monitor account volume count/size quota
- Ensure API token has volumes:read_write scope
- After a failed run, check for partially created volumes to avoid duplicates
When it happens
Trigger: Volume does not exist under the truncated/normalized label, so CreateVolume is invoked and the API rejects it: account volume limit reached, region has no capacity, region string invalid, label already taken by another volume, invalid token/scopes, or a 500 from the API.
Common situations: New cluster bring-up in a region with volume quota exhausted; reusing a label that exists under a different name that escaped the label-based Find (name longer than 32 chars truncates differently); typo in region in the cluster spec; expired or under-scoped API token.
Related errors
- error resizing Akamai (Linode) volume %q: %w
- error creating Akamai (Linode) VPC %q: %w
- adding encryptionconfig secret: %v
- updating encryptionconfig secret: %v
- unable to check for instanceGroup: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/513c98959c2fe033.
Report an issue: GitHub.