{"record":{"id":"81e1155a642cd6e9","repo":"kubernetes/kops","slug":"getting-ip-of-server-s-for-load-balancer-s-back-e","errorCode":null,"errorMessage":"getting IP of server %s for load-balancer's back-end: %w","messagePattern":"getting IP of server (.+?) for load-balancer's back-end: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go","lineNumber":257,"sourceCode":"func (l *LBBackend) TerraformLink() *terraformWriter.Literal {\n\treturn terraformWriter.LiteralProperty(\"scaleway_lb_backend\", fi.ValueOf(l.Name), \"id\")\n}\n\nfunc getControlPlanesIPs(scwCloud scaleway.ScwCloud, lb *LoadBalancer, zone scw.Zone) ([]string, error) {\n\tvar controlPlanePrivateIPs []string\n\n\tservers, err := scwCloud.GetClusterServers(scwCloud.ClusterName(lb.Tags), nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"getting cluster servers for load-balancer's back-end: %w\", err)\n\t}\n\n\tfor _, server := range servers {\n\t\tif role := scaleway.InstanceRoleFromTags(server.Tags); role == scaleway.TagRoleWorker {\n\t\t\tcontinue\n\t\t}\n\t\tip, err := scwCloud.GetServerIP(server.ID, server.Zone)\n\t\tif err != nil {\n\t\t\treturn nil, fmt.Errorf(\"getting IP of server %s for load-balancer's back-end: %w\", server.Name, err)\n\t\t}\n\t\tcontrolPlanePrivateIPs = append(controlPlanePrivateIPs, ip)\n\t}\n\n\treturn controlPlanePrivateIPs, nil\n}\n","sourceCodeStart":239,"sourceCodeEnd":264,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go#L239-L264","documentation":"kOps wraps failures from `scwCloud.GetServerIP(server.ID, server.Zone)`, which resolves a control-plane server's private IP for the LB back-end, when iterating over cluster servers (workers are skipped). Thrown from getControlPlanesIPs, called by RenderScw.","triggerScenarios":"For each non-worker server from GetClusterServers, GetServerIP is called; it fails because the server was deleted between list and fetch (stale entry), the zone is wrong, or the GetServer API call errors (auth, outage, rate limit).","commonSituations":"Control-plane instance deleted/replaced concurrently (stale server ID); server not yet assigned an IP (still provisioning); wrong zone passed; API rate-limiting during large clusters.","solutions":["Rerun `kops update cluster` so the server list is refreshed against current instances","Check the named server exists in the Scaleway console and is in 'running' state with an IP assigned","Verify the server's zone matches the cloud zone configuration","Add retry/backoff if rate-limit (429) errors are reported in the wrapped error","If a deleted instance persistently appears, fix stale instance records or re-sync the cluster"],"exampleFix":"// before: hard fail on any server\nip, err := scwCloud.GetServerIP(server.ID, server.Zone)\nif err != nil { return nil, fmt.Errorf(\"getting IP of server %s ...: %w\", server.Name, err) }\n// after: skip stale servers without an IP yet\nip, err := scwCloud.GetServerIP(server.ID, server.Zone)\nif err != nil {\n    klog.Warningf(\"skipping server %s: %v\", server.Name, err)\n    continue\n}","handlingStrategy":"validation","validationCode":"// skip servers that cannot have an IP yet\nif server.State != instance.ServerStateRunning { klog.Warningf(\"server %s not running (%s)\", server.Name, server.State); continue }\nif server.Zone == \"\" { return fmt.Errorf(\"server %s has no zone\", server.Name) }","typeGuard":null,"tryCatchPattern":"if len(controlPlanePrivateIPs) == 0 {\n    return fmt.Errorf(\"no control-plane IPs resolved: last error: %w\", err)\n}","preventionTips":["Tolerate stale/deleted servers by re-listing instead of failing the whole reconcile","Ensure control planes are fully running before LB backend updates","Watch for 429 rate-limits when resolving many server IPs sequentially"],"tags":["scaleway","instances","networking","api-error"],"backgroundTag":"server-ip-lookup-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"}