{"record":{"id":"cae05928dc17b014","repo":"kubernetes/kops","slug":"failed-to-list-cluster-volumes-w","errorCode":null,"errorMessage":"failed to list cluster volumes: %w","messagePattern":"failed to list cluster volumes: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":494,"sourceCode":"\tallSSHKeys, err := s.iamAPI.ListSSHKeys(&iam.ListSSHKeysRequest{}, scw.WithAllPages())\n\tfor _, sshkey := range allSSHKeys.SSHKeys {\n\t\tif strings.HasPrefix(sshkey.Name, fmt.Sprintf(\"kubernetes.%s-\", clusterName)) {\n\t\t\tclusterSSHKeys = append(clusterSSHKeys, sshkey)\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list cluster ssh keys: %w\", err)\n\t}\n\treturn clusterSSHKeys, nil\n}\n\nfunc (s *scwCloudImplementation) GetClusterVolumes(clusterName string) ([]*instance.Volume, error) {\n\tvolumes, err := s.instanceAPI.ListVolumes(&instance.ListVolumesRequest{\n\t\tZone: s.zone,\n\t\tTags: []string{TagClusterName + \"=\" + clusterName},\n\t}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list cluster volumes: %w\", err)\n\t}\n\treturn volumes.Volumes, nil\n}\n\nfunc (s *scwCloudImplementation) GetServerIP(serverID string, zone scw.Zone) (string, error) {\n\tregion, err := zone.Region()\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"converting zone %s to region: %w\", zone, err)\n\t}\n\n\tips, err := s.ipamAPI.ListIPs(&ipam.ListIPsRequest{\n\t\tRegion:     region,\n\t\tIsIPv6:     new(false),\n\t\tResourceID: &serverID,\n\t\tZonal:      new(zone.String()),\n\t}, scw.WithAllPages())\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"listing IPs for server %s: %w\", serverID, err)","sourceCodeStart":476,"sourceCodeEnd":512,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L476-L512","documentation":"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.","triggerScenarios":"ListVolumes API failure: bad credentials, wrong/unknown s.zone, invalid tag string, network error, or Scaleway API outage/rate limiting.","commonSituations":"Cluster spec zone changed after creation so volumes live in a different zone; expired credentials; Scaleway regional incident; quota/permission issues on the project.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// verify zone and tag filter before volume lookups\nzones, err := instance.NewAPI(client).Zones().All()\nif err != nil { return err }\nif !zones.Contains(s.zone) {\n  return fmt.Errorf(\"zone %s does not exist or is unavailable\", s.zone)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["scaleway","volumes","api-error","cloud-provider"],"backgroundTag":"scaleway-api-request-failed","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"}