kubernetes/kops · error
failed to list cluster volumes: %w
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.
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)
Solutions
- Verify credentials and that the configured zone (s.zone) matches the zone where the cluster's volumes were created.
- Reproduce with `scw instance volume list zone=<zone>` using the same credentials to see the raw error.
- Check project quotas and IAM permissions for instance volume listing.
- 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
- Never change the cluster's zone after creation; volumes stay in the original zone.
- Validate the configured zone against the SDK's zone enum at client init.
- Check project quotas before provisioning many volumes.
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
- failed to list cluster servers: %w
- listing IPs for deletion: %w
- failed to delete instance IP %s: %w
- failed to list cluster ssh keys: %w
- listing IPs for server %s: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/cae05928dc17b014.
Report an issue: GitHub.