kubernetes/kops · error

error listing Disks: %v

Error message

error listing Disks: %v

What it means

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.

Source

Thrown at upup/pkg/fi/cloudup/gcetasks/disk.go:60

	Zone             *string
	Labels           map[string]string
}

var _ fi.CompareWithID = (*Disk)(nil)

func (e *Disk) CompareWithID() *string {
	return e.Name
}

func (e *Disk) Find(c *fi.CloudupContext) (*Disk, error) {
	cloud := c.T.Cloud.(gce.GCECloud)

	r, err := cloud.Compute().Disks().Get(cloud.Project(), *e.Zone, *e.Name)
	if err != nil {
		if gce.IsNotFound(err) {
			return nil, nil
		}
		return nil, fmt.Errorf("error listing Disks: %v", err)
	}

	actual := &Disk{}
	actual.Name = &r.Name
	actual.VolumeType = new(gce.LastComponent(r.Type))
	actual.Zone = new(gce.LastComponent(r.Zone))
	actual.SizeGB = &r.SizeGb
	actual.VolumeIops = &r.ProvisionedIops
	actual.VolumeThroughput = &r.ProvisionedThroughput

	actual.Labels = r.Labels

	// Ignore "system" fields
	actual.Lifecycle = e.Lifecycle

	return actual, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Inspect the wrapped error for the Google API status code
  2. Confirm the disk name and zone in the spec are correct
  3. Ensure the service account can compute.disks.get in the project
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/gcetasks/disk.go:60 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/40292872ef86dc82. Report an issue: GitHub.