kubernetes/kops · error
error during Disk creation: %v
Error message
error during Disk creation: %v
What it means
kOps' GCE Disk task throws this when the long-running Google Compute API Insert operation for a persistent disk completes but WaitForOp reports the operation itself failed. The disk creation API call was accepted, but GCP returned an operation error during asynchronous provisioning.
Source
Thrown at upup/pkg/fi/cloudup/gcetasks/disk.go:139
SizeGb: *e.SizeGB,
Type: typeURL,
}
if e.VolumeIops != nil {
disk.ProvisionedIops = *e.VolumeIops
}
if e.VolumeThroughput != nil {
disk.ProvisionedThroughput = *e.VolumeThroughput
}
if a == nil {
op, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk)
if err != nil {
return fmt.Errorf("error creating Disk: %v", err)
}
err = cloud.WaitForOp(op)
if err != nil {
return fmt.Errorf("error during Disk creation: %v", err)
}
}
if changes.Labels != nil {
d, err := cloud.Compute().Disks().Get(t.Cloud.Project(), *e.Zone, disk.Name)
if err != nil {
return fmt.Errorf("error reading created Disk: %v", err)
}
labelsRequest := &compute.ZoneSetLabelsRequest{
LabelFingerprint: d.LabelFingerprint,
Labels: make(map[string]string),
}
// Danger: labels replace tags on instances; but thankfully volumes don't have tags
//for _, k := range d.Tags {
// labelsRequest.Labels[k] = ""
//}
maps.Copy(labelsRequest.Labels, d.Labels)View on GitHub (pinned to 4c8573c808)
Solutions
- Inspect the wrapped %v error for the GCP operation error detail (often quota or zone capacity)
- Check persistent disk quota in the target zone via gcloud compute project-info describe / console
- Verify disk size and type are supported in the zone
- Retry the kops update once transient GCP issues resolve
- Choose a different zone if capacity/quota is persistently exhausted
Example fix
// before op, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk) // after: check quota/zone from the wrapped op error, e.g. // gcloud compute disks create <name> --size=<size> --zone=<zone> --type=<type> // to reproduce the raw GCP error before retrying
Defensive patterns
Strategy: retry
Validate before calling
// pre-check quota and zone validity
desc, _ := computeService.Zones.Get(project, zone).Do()
if desc == nil || desc.Status != "UP" { return fmt.Errorf("zone %s unavailable", zone) } Try / catch
if err := fi.WaitForOp(...); err != nil {
if gcp.IsQuotaExceeded(err) { /* backoff and retry, or request quota increase */ }
return fmt.Errorf("disk create op failed: %w", err)
} Prevention
- Monitor persistent-disk quota per zone before scaling
- Pin disk types/sizes supported by the target zone
- Retry with exponential backoff on transient GCP op errors
When it happens
Trigger: RenderGCE creates a new disk via cloud.Compute().Disks().Insert(project, zone, disk); the returned op is passed to cloud.WaitForOp(op), and the operation ends with an error state (e.g. quota exceeded, zone unavailable, invalid disk spec).
Common situations: GCP regional persistent disk quota exhausted in the zone; disk size/ type invalid for the zone; zone capacity issues; project-level disk limits; transient GCP API failures during cluster bring-up.
Related errors
- error reading created Disk: %v
- error setting labels on created Disk: %v
- cannot apply changes to Disk: %v
- creating gce IPAM controller: %w
- error getting ingress status: %v
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/1ee1022d3526c651.
Report an issue: GitHub.