kubernetes/kops · error
listing IPs for server %s: %w
Error message
listing IPs for server %s: %w
What it means
Wrap-around error from GetServerIP when the Scaleway IPAM API ListIPs (filtered by region, IPv4 only, resource ID = server, zonal) fails. The SDK error is preserved with %w. IPAM is Scaleway's source of truth for resource IPs, so this call is how the server's private IP is resolved.
Source
Thrown at upup/pkg/fi/cloudup/scaleway/cloud.go:512
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)
}
if len(ips.IPs) < 1 {
return "", fmt.Errorf("could not find IP for server %s", serverID)
}
if len(ips.IPs) > 1 {
klog.V(10).Infof("Found more than 1 IP for server %s, using %s", serverID, ips.IPs[0].Address.IP.String())
}
return ips.IPs[0].Address.IP.String(), nil
}
func (s *scwCloudImplementation) DeleteDNSRecord(record *domain.Record, clusterName string) error {
domainName := strings.SplitN(clusterName, ".", 2)[1]
recordDeleteRequest := &domain.UpdateDNSZoneRecordsRequest{
DNSZone: domainName,
Changes: []*domain.RecordChange{
{View on GitHub (pinned to 4c8573c808)
Solutions
- Confirm the credentials/project can see the server: `scw ipam ip list resource-id=<serverID> zone=<zone>`.
- Verify the server actually exists in the given zone (a stale/terminated server ID will not resolve).
- Retry with backoff on 429/5xx; check Scaleway status for IPAM incidents.
- If the project predates IPAM coverage for that resource type, migrate resources or upgrade tooling per Scaleway IPAM docs.
Defensive patterns
Strategy: retry
Validate before calling
// preflight: IPAM reachable and resource visible
ipamAPI := ipam.NewAPI(client)
if _, err := ipamAPI.ListIPs(&ipam.ListIPsRequest{Region: region, PageSize: scw.Uint32Ptr(1)}); err != nil {
return fmt.Errorf("ipam preflight failed: %w", err)
} Try / catch
ip, err := cloud.GetServerIP(serverID, zone)
if err != nil {
var scwErr *scw.Error
if errors.As(err, &scwErr) && (scwErr.StatusCode == 429 || scwErr.StatusCode >= 500) {
return retryAfter(backoff)
}
return err
} Prevention
- Use credentials from the same project as the servers so IPAM can resolve them.
- Retry transient failures with exponential backoff instead of failing teardown immediately.
- Keep SDK versions current; IPAM coverage and regions expand over time.
When it happens
Trigger: ipam.API.ListIPs failure: invalid credentials, IPAM not available/enabled in the zone/region, server resource not visible to the project, network error, or API outage/rate limit.
Common situations: Older Scaleway projects where IPAM doesn't cover legacy resources; wrong project credentials so the server ID isn't found by IPAM; Scaleway IPAM incident during deregistration or cloud-group build.
Related errors
- listing IPs for deletion: %w
- failed to get IP for server %q: %w
- no IP found for server %q: %w
- describing instance for arn %q
- failed to delete instance IP %s: %w
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/67cfea5b7d3fba45.
Report an issue: GitHub.