kubernetes/kops · error
failed to list cluster servers: %w
Error message
failed to list cluster servers: %w
What it means
Wrap-around error returned by scwCloudImplementation.GetClusterServers when the Scaleway Instance API ListServers call (paginated with scw.WithAllPages) fails. It carries the underlying SDK error via %w so callers can errors.Is/As into scaleway SDK errors. A variant with the instance-group name is used when an instanceGroupName filter was supplied.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:469
return lbs.LBs, nil
}
func (s *scwCloudImplementation) GetClusterServers(clusterName string, instanceGroupName *string) ([]*instance.Server, error) {
tags := []string{TagClusterName + "=" + clusterName}
if instanceGroupName != nil {
tags = append(tags, fmt.Sprintf("%s=%s", TagInstanceGroup, *instanceGroupName))
}
request := &instance.ListServersRequest{
Zone: s.zone,
Name: instanceGroupName,
Tags: tags,
}
servers, err := s.instanceAPI.ListServers(request, scw.WithAllPages())
if err != nil {
if instanceGroupName != nil {
return nil, fmt.Errorf("failed to list cluster servers named %q: %w", *instanceGroupName, err)
}
return nil, fmt.Errorf("failed to list cluster servers: %w", err)
}
return servers.Servers, nil
}
func (s *scwCloudImplementation) GetClusterSSHKeys(clusterName string) ([]*iam.SSHKey, error) {
clusterSSHKeys := []*iam.SSHKey(nil)
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
}
View on GitHub (pinned to 4c8573c808)
Solutions
- Verify Scaleway credentials (SCW_ACCESS_KEY, SCW_SECRET_KEY, SCW_DEFAULT_PROJECT_ID) are valid and unexpired with `scw init` or `scw instance server list`.
- Confirm the zone configured for the cluster exists and is up (e.g. fr-par-1) and that the account has quota in it.
- Run the ListServers call directly via the scw CLI to see the raw API error (auth 403 vs 404 vs 429 vs 5xx).
- If rate-limited (429), retry after backoff or reduce concurrent kops operations.
- Check https://status.scaleway.com for ongoing incidents and retry once resolved.
Example fix
// before
servers, err := s.instanceAPI.ListServers(request, scw.WithAllPages())
if err != nil {
return nil, fmt.Errorf("failed to list cluster servers: %w", err)
}
// after
servers, err := s.instanceAPI.ListServers(request, scw.WithAllPages())
if err != nil {
var sdkErr *scw.Error
if errors.As(err, &sdkErr) && sdkErr.StatusCode == http.StatusTooManyRequests {
return nil, retryableError(fmt.Errorf("failed to list cluster servers: %w", err))
}
return nil, fmt.Errorf("failed to list cluster servers: %w", err)
} Defensive patterns
Strategy: retry
Validate before calling
// before calling kops scaleway operations
import "github.com/scaleway/scaleway-sdk-go/scw"
client, err := scw.NewClient(scw.WithEnv())
if err != nil { return err }
_, err = client.GetRaw().Do("GET", "/instance/v1/zones/fr-par-1/servers", nil, nil, nil)
// fail fast if credentials/zone are wrong Try / catch
err := runKops(); if err != nil {
var scwErr *scw.Error
if errors.As(err, &scwErr) && scwErr.StatusCode >= 500 || scwErr.StatusCode == 429 {
// retry with backoff
}
} Prevention
- Run `scw init` / `scw instance server list` before large kops operations to validate credentials and zone.
- Pin the Scaleway SDK/kops version to one that supports your target zones.
- Respect API rate limits; avoid parallel cluster mutations.
- Subscribe to Scaleway status updates for incident awareness.
When it happens
Trigger: Any ListServers API failure: invalid or missing Scaleway credentials (access key/secret key/project ID), wrong or unavailable zone, network failure, Scaleway API outage/429 rate limiting, or an invalid tag filter derived from cluster name.
Common situations: Expired or rotated Scaleway credentials in the environment; region/zone misconfiguration in the cluster spec; Scaleway incident causing 5xx; rate limits hit during large cluster operations.
Related errors
- failed to list cluster volumes: %w
- error on getting VM ScaleSet: %s
- listing IPs for deletion: %w
- failed to delete instance IP %s: %w
- error creating Akamai (Linode) SSH key %q: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/f20485b0864b5867.
Report an issue: GitHub.