{"record":{"id":"67cfea5b7d3fba45","repo":"kubernetes/kops","slug":"listing-ips-for-server-s-w","errorCode":null,"errorMessage":"listing IPs for server %s: %w","messagePattern":"listing IPs for server (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scaleway/cloud.go","lineNumber":512,"sourceCode":"\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)\n\t}\n\n\tif len(ips.IPs) < 1 {\n\t\treturn \"\", fmt.Errorf(\"could not find IP for server %s\", serverID)\n\t}\n\tif len(ips.IPs) > 1 {\n\t\tklog.V(10).Infof(\"Found more than 1 IP for server %s, using %s\", serverID, ips.IPs[0].Address.IP.String())\n\t}\n\n\treturn ips.IPs[0].Address.IP.String(), nil\n}\n\nfunc (s *scwCloudImplementation) DeleteDNSRecord(record *domain.Record, clusterName string) error {\n\tdomainName := strings.SplitN(clusterName, \".\", 2)[1]\n\trecordDeleteRequest := &domain.UpdateDNSZoneRecordsRequest{\n\t\tDNSZone: domainName,\n\t\tChanges: []*domain.RecordChange{\n\t\t\t{","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scaleway/cloud.go#L494-L530","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// preflight: IPAM reachable and resource visible\nipamAPI := ipam.NewAPI(client)\nif _, err := ipamAPI.ListIPs(&ipam.ListIPsRequest{Region: region, PageSize: scw.Uint32Ptr(1)}); err != nil {\n  return fmt.Errorf(\"ipam preflight failed: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"ip, err := cloud.GetServerIP(serverID, zone)\nif err != nil {\n  var scwErr *scw.Error\n  if errors.As(err, &scwErr) && (scwErr.StatusCode == 429 || scwErr.StatusCode >= 500) {\n    return retryAfter(backoff)\n  }\n  return err\n}","preventionTips":["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."],"tags":["scaleway","ipam","network","api-error"],"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-12T12:17:11.808Z"}