{"record":{"id":"40292872ef86dc82","repo":"kubernetes/kops","slug":"error-listing-disks-v-402928","errorCode":null,"errorMessage":"error listing Disks: %v","messagePattern":"error listing Disks: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/gcetasks/disk.go","lineNumber":60,"sourceCode":"\tZone             *string\n\tLabels           map[string]string\n}\n\nvar _ fi.CompareWithID = (*Disk)(nil)\n\nfunc (e *Disk) CompareWithID() *string {\n\treturn e.Name\n}\n\nfunc (e *Disk) Find(c *fi.CloudupContext) (*Disk, error) {\n\tcloud := c.T.Cloud.(gce.GCECloud)\n\n\tr, err := cloud.Compute().Disks().Get(cloud.Project(), *e.Zone, *e.Name)\n\tif err != nil {\n\t\tif gce.IsNotFound(err) {\n\t\t\treturn nil, nil\n\t\t}\n\t\treturn nil, fmt.Errorf(\"error listing Disks: %v\", err)\n\t}\n\n\tactual := &Disk{}\n\tactual.Name = &r.Name\n\tactual.VolumeType = new(gce.LastComponent(r.Type))\n\tactual.Zone = new(gce.LastComponent(r.Zone))\n\tactual.SizeGB = &r.SizeGb\n\tactual.VolumeIops = &r.ProvisionedIops\n\tactual.VolumeThroughput = &r.ProvisionedThroughput\n\n\tactual.Labels = r.Labels\n\n\t// Ignore \"system\" fields\n\tactual.Lifecycle = e.Lifecycle\n\n\treturn actual, nil\n}\n","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/gcetasks/disk.go#L42-L78","documentation":"Wrapped error from Disk.Find when Disks.Get fails with a non-404 error. Despite saying 'listing', this is a single-disk Get; it fires on permission denials, wrong project/zone, or API-level failures during cloud discovery.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/gcetasks/disk.go:60 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the wrapped error for the Google API status code","Confirm the disk name and zone in the spec are correct","Ensure the service account can compute.disks.get in the project"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}