kubernetes/kops · error

error listing disks: %v

Error message

error listing disks: %v

What it means

findGCEDisks wraps the Compute Disks.AggregatedList failure while discovering cluster disks by label across all zones. It fires when the GCE API errors (quota, auth, project misconfiguration), aborting `kops delete cluster` disk discovery for GCE.

Source

Thrown at pkg/resources/gce/gce.go:300

	return resourceTrackers, nil
}

// findGCEDisks finds all Disks that are associated with the current cluster
// It matches them by looking for the cluster label
func (d *clusterDiscoveryGCE) findGCEDisks() ([]*compute.Disk, error) {
	c := d.gceCloud

	clusterLabel := gce.LabelForCluster(d.clusterName)

	var matches []*compute.Disk

	ctx := context.Background()

	// TODO: Push down tag filter?

	diskLists, err := c.Compute().Disks().AggregatedList(ctx, c.Project())
	if err != nil {
		return nil, fmt.Errorf("error listing disks: %v", err)
	}

	for _, list := range diskLists {
		for _, d := range list.Disks {
			match := false
			for k, v := range d.Labels {
				if k == clusterLabel.Key {
					if v == clusterLabel.Value {
						match = true
					} else {
						match = false
						break
					}
				}
			}

			if !match {
				continue

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Check GCP credentials and compute.disks.list permission
  2. Retry after transient API or quota errors
  3. Verify the project and zones are accessible
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/resources/gce/gce.go:300 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/4956acda1ad62bdb. Report an issue: GitHub.