kubernetes/kops · error

failed to list cluster volumes

Error message

failed to list cluster volumes: %w

What it means

Wrap-around error from GetClusterVolumes when the Instance API ListVolumes call, filtered by the kops cluster-name tag and paginated with scw.WithAllPages, fails. The SDK error is preserved with %w. Note it is not raised when zero volumes match the tag filter.

Solutions

  1. Verify credentials and that the configured zone (s.zone) matches the zone where the cluster's volumes were created.
  2. Reproduce with `scw instance volume list zone=<zone>` using the same credentials to see the raw error.
  3. Check project quotas and IAM permissions for instance volume listing.
  4. Handle 429/5xx with retry/backoff and check Scaleway status during incidents.
Defensive patterns

Strategy: validation

Validate before calling

// verify zone and tag filter before volume lookups
zones, err := instance.NewAPI(client).Zones().All()
if err != nil { return err }
if !zones.Contains(s.zone) {
  return fmt.Errorf("zone %s does not exist or is unavailable", s.zone)
}

Prevention

When it happens

Trigger: ListVolumes API failure: bad credentials, wrong/unknown s.zone, invalid tag string, network error, or Scaleway API outage/rate limiting.

Common situations: Cluster spec zone changed after creation so volumes live in a different zone; expired credentials; Scaleway regional incident; quota/permission issues on the project.

Related errors


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

Appendix: source

Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:494

	allSSHKeys, err := s.iamAPI.ListSSHKeys(&iam.ListSSHKeysRequest{}, scw.WithAllPages())
	for _, sshkey := range allSSHKeys.SSHKeys {
		if strings.HasPrefix(sshkey.Name, fmt.Sprintf("kubernetes.%s-", clusterName)) {
			clusterSSHKeys = append(clusterSSHKeys, sshkey)
		}
	}
	if err != nil {
		return nil, fmt.Errorf("failed to list cluster ssh keys: %w", err)
	}
	return clusterSSHKeys, nil
}

func (s *scwCloudImplementation) GetClusterVolumes(clusterName string) ([]*instance.Volume, error) {
	volumes, err := s.instanceAPI.ListVolumes(&instance.ListVolumesRequest{
		Zone: s.zone,
		Tags: []string{TagClusterName + "=" + clusterName},
	}, scw.WithAllPages())
	if err != nil {
		return nil, fmt.Errorf("failed to list cluster volumes: %w", err)
	}
	return volumes.Volumes, nil
}

func (s *scwCloudImplementation) GetServerIP(serverID string, zone scw.Zone) (string, error) {
	region, err := zone.Region()
	if err != nil {
		return "", fmt.Errorf("converting zone %s to region: %w", zone, err)
	}

	ips, err := s.ipamAPI.ListIPs(&ipam.ListIPsRequest{
		Region:     region,
		IsIPv6:     new(false),
		ResourceID: &serverID,
		Zonal:      new(zone.String()),
	}, scw.WithAllPages())
	if err != nil {
		return "", fmt.Errorf("listing IPs for server %s: %w", serverID, err)

View on GitHub (pinned to 4c8573c808)