{"record":{"id":"1ee1022d3526c651","repo":"kubernetes/kops","slug":"error-during-disk-creation-v","errorCode":null,"errorMessage":"error during Disk creation: %v","messagePattern":"error during Disk creation: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/disk.go","lineNumber":139,"sourceCode":"\t\tSizeGb: *e.SizeGB,\n\t\tType:   typeURL,\n\t}\n\n\tif e.VolumeIops != nil {\n\t\tdisk.ProvisionedIops = *e.VolumeIops\n\t}\n\tif e.VolumeThroughput != nil {\n\t\tdisk.ProvisionedThroughput = *e.VolumeThroughput\n\t}\n\n\tif a == nil {\n\t\top, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating Disk: %v\", err)\n\t\t}\n\t\terr = cloud.WaitForOp(op)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error during Disk creation: %v\", err)\n\t\t}\n\t}\n\n\tif changes.Labels != nil {\n\t\td, err := cloud.Compute().Disks().Get(t.Cloud.Project(), *e.Zone, disk.Name)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error reading created Disk: %v\", err)\n\t\t}\n\n\t\tlabelsRequest := &compute.ZoneSetLabelsRequest{\n\t\t\tLabelFingerprint: d.LabelFingerprint,\n\t\t\tLabels:           make(map[string]string),\n\t\t}\n\t\t// Danger: labels replace tags on instances; but thankfully volumes don't have tags\n\t\t//for _, k := range d.Tags {\n\t\t//\tlabelsRequest.Labels[k] = \"\"\n\t\t//}\n\t\tmaps.Copy(labelsRequest.Labels, d.Labels)","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/disk.go#L121-L157","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before\nop, err := cloud.Compute().Disks().Insert(t.Cloud.Project(), *e.Zone, disk)\n// after: check quota/zone from the wrapped op error, e.g.\n// gcloud compute disks create <name> --size=<size> --zone=<zone> --type=<type>\n// to reproduce the raw GCP error before retrying","handlingStrategy":"retry","validationCode":"// pre-check quota and zone validity\ndesc, _ := computeService.Zones.Get(project, zone).Do()\nif desc == nil || desc.Status != \"UP\" { return fmt.Errorf(\"zone %s unavailable\", zone) }","typeGuard":null,"tryCatchPattern":"if err := fi.WaitForOp(...); err != nil {\n  if gcp.IsQuotaExceeded(err) { /* backoff and retry, or request quota increase */ }\n  return fmt.Errorf(\"disk create op failed: %w\", err)\n}","preventionTips":["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"],"tags":["gcp","gce","disk","cloud-api"],"backgroundTag":"gcp-operation-failed","analyzedSha":"4c8573c808a73d578c5eadc86d410646ea0b0d73","analyzedAt":"2026-09-05T04:13:19.212Z","contentChangedAt":"2026-09-05T04:13:19.212Z","schemaVersion":2},"datasetVersion":"2026-09-12T07:17:12.445Z"}