{"record":{"id":"f0579fa8840d7a8f","repo":"kubernetes/kops","slug":"updating-back-end-server-ips-for-load-balancer-s","errorCode":null,"errorMessage":"updating back-end server IPs for load-balancer %s: %w","messagePattern":"updating back-end server IPs for load-balancer (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go","lineNumber":163,"sourceCode":"\t\t\tBackendID:            fi.ValueOf(actual.ID),\n\t\t\tName:                 fi.ValueOf(actual.Name),\n\t\t\tForwardProtocol:      lb.Protocol(fi.ValueOf(expected.ForwardProtocol)),\n\t\t\tForwardPort:          fi.ValueOf(expected.ForwardPort),\n\t\t\tForwardPortAlgorithm: lb.ForwardPortAlgorithm(fi.ValueOf(expected.ForwardPortAlgorithm)),\n\t\t\tStickySessions:       lb.StickySessionsType(fi.ValueOf(expected.StickySessions)),\n\t\t\tProxyProtocol:        lb.ProxyProtocol(fi.ValueOf(expected.ProxyProtocol)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"updating back-end for load-balancer %s: %w\", fi.ValueOf(actual.LoadBalancer.Name), err)\n\t\t}\n\n\t\t_, err = lbService.SetBackendServers(&lb.ZonedAPISetBackendServersRequest{\n\t\t\tZone:      zone,\n\t\t\tBackendID: fi.ValueOf(actual.ID),\n\t\t\tServerIP:  controlPlanesIPs,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"updating back-end server IPs for load-balancer %s: %w\", fi.ValueOf(actual.LoadBalancer.Name), err)\n\t\t}\n\n\t} else {\n\n\t\tbackendCreated, err := lbService.CreateBackend(&lb.ZonedAPICreateBackendRequest{\n\t\t\tZone:                 zone,\n\t\t\tLBID:                 fi.ValueOf(expected.LoadBalancer.LBID),\n\t\t\tName:                 fi.ValueOf(expected.Name),\n\t\t\tForwardProtocol:      lb.Protocol(fi.ValueOf(expected.ForwardProtocol)),\n\t\t\tForwardPort:          fi.ValueOf(expected.ForwardPort),\n\t\t\tForwardPortAlgorithm: lb.ForwardPortAlgorithm(fi.ValueOf(expected.ForwardPortAlgorithm)),\n\t\t\tStickySessions:       lb.StickySessionsType(fi.ValueOf(expected.StickySessions)),\n\t\t\tHealthCheck: &lb.HealthCheck{\n\t\t\t\tCheckMaxRetries: 5,\n\t\t\t\tTCPConfig:       &lb.HealthCheckTCPConfig{},\n\t\t\t\tPort:            fi.ValueOf(expected.ForwardPort),\n\t\t\t\tCheckTimeout:    scw.TimeDurationPtr(3000),\n\t\t\t\tCheckDelay:      scw.TimeDurationPtr(1001),","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go#L145-L181","documentation":"kOps wraps any failure from the Scaleway SDK `lbService.SetBackendServers` call (which updates which server IPs a load-balancer back-end forwards traffic to) with the load-balancer's name. The wrapped error comes from the Scaleway LB API over the network. It is thrown while reconciling the LoadBalancerBackend task in RenderScw when the back-end already exists but its server IP list must change.","triggerScenarios":"RenderScw finds an existing back-end (`actual`) and calls SetBackendServers with the new control-plane private IPs; the Scaleway Zoned API rejects or times out the request — e.g. invalid backend ID, LB in a transient state, quota on back-end servers, or network/auth failure.","commonSituations":"Control-plane instance set was resized or replaced so back-end IPs must be updated; Scaleway API transient 5xx/timeout during cluster reconcile; LB was deleted out-of-band; Scaleway credentials expired; scw zone mismatch.","solutions":["Rerun `kops update cluster` — Scaleway LB errors are often transient; the retry is idempotent","Verify the load-balancer and back-end still exist in the Scaleway console for the cluster's zone","Check SCALEWAY API credentials/permissions (lb-editor role needed) and network reachability","Check Scaleway status page for LB API incidents","Increase retry/timeout or file a bug if a specific API error code (e.g. quota exceeded) recurs"],"exampleFix":"// before (no handling of transient failure)\n_, err = lbService.SetBackendServers(...)\n// after (retry transient failures)\nvar resp *lb.Backend\nvar rerr error\nfor i := 0; i < 3; i++ {\n    resp, rerr = lbService.SetBackendServers(req)\n    if rerr == nil || !scw.IsTransientError(rerr) { break }\n    time.Sleep(time.Duration(i+1) * 5 * time.Second)\n}","handlingStrategy":"retry","validationCode":"// before update: ensure backend and LB exist and are ready\nbackend, _, err := lbService.GetBackend(&lb.ZonedAPIGetBackendRequest{Zone: zone, BackendID: backendID})\nif err != nil { return fmt.Errorf(\"backend %s missing: %w\", backendID, err) }\nif _, err := lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{Zone: zone, LBID: lbID}); err != nil { return err }","typeGuard":null,"tryCatchPattern":"var serr *scw.ResponseError\nif errors.As(err, &serr) {\n    switch serr.Status {\n    case 404:\n        // recreate backend instead of updating\n    case 429, 500, 502, 503, 504:\n        // transient: retry with backoff\n    default:\n        return err // permanent: surface to user\n    }\n}","preventionTips":["Re-run kops update cluster idempotently rather than hand-editing LB back-ends","Wait for the LB to be ready before mutating its back-ends","Keep Scaleway credentials fresh and scoped to the correct project","Monitor Scaleway status page during large cluster operations"],"tags":["scaleway","load-balancer","api-error","networking"],"backgroundTag":"scaleway-lb-backend-update-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"}