{"record":{"id":"cb516758f7bb4518","repo":"kubernetes/kops","slug":"waiting-for-load-balancer-s-w","errorCode":null,"errorMessage":"waiting for load-balancer %s: %w","messagePattern":"waiting for load-balancer (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go","lineNumber":199,"sourceCode":"\t\t\t\tCheckDelay:      scw.TimeDurationPtr(1001),\n\t\t\t},\n\t\t\tServerIP:      controlPlanesIPs,\n\t\t\tProxyProtocol: lb.ProxyProtocol(fi.ValueOf(expected.ProxyProtocol)),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating back-end for load-balancer %s: %w\", fi.ValueOf(expected.LoadBalancer.Name), err)\n\t\t}\n\n\t\texpected.ID = &backendCreated.ID\n\n\t}\n\n\t_, err = lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{\n\t\tLBID: fi.ValueOf(expected.LoadBalancer.LBID),\n\t\tZone: zone,\n\t})\n\tif err != nil {\n\t\treturn fmt.Errorf(\"waiting for load-balancer %s: %w\", fi.ValueOf(expected.LoadBalancer.Name), err)\n\t}\n\n\treturn nil\n}\n\ntype terraformLBBackend struct {\n\tLBID            *terraformWriter.Literal   `cty:\"lb_id\"`\n\tName            *string                    `cty:\"name\"`\n\tForwardProtocol *string                    `cty:\"forward_protocol\"`\n\tForwardPort     *int32                     `cty:\"forward_port\"`\n\tProxyProtocol   *string                    `cty:\"proxy_protocol\"`\n\tServerIPs       []*terraformWriter.Literal `cty:\"server_ips\"`\n}\n\nfunc (l *LBBackend) RenderTerraform(t *terraform.TerraformTarget, actual, expected, changes *LBBackend) error {\n\tvar serverIPs []*terraformWriter.Literal\n\tresources, err := t.GetResourcesByType()\n\tif err != nil {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/lb_backend.go#L181-L217","documentation":"kOps wraps failures from `lbService.WaitForLb`, the Scaleway SDK helper that polls the LB until it leaves a transient state, after creating or updating a back-end. If the LB never becomes ready within the SDK's retry budget (or the polling API calls fail), this error surfaces. Thrown at the end of RenderScw for LoadBalancerBackend.","triggerScenarios":"After SetBackendServers/CreateBackend completes, RenderScw calls WaitForLb on expected.LoadBalancer.LBID; the LB stays in 'migrating'/'pending' state too long, or polling ListLB/GetLB requests fail (auth, network, LB deleted).","commonSituations":"Large LB migrations on Scaleway exceeding WaitForLb default timeout; LB deleted out-of-band mid-reconcile; Scaleway API incident; wrong zone so the LB is not found.","solutions":["Rerun `kops update cluster` later — the LB may simply need more time","Check LB status in Scaleway console; if stuck, detach/reattach or recreate the LB","Verify the zone/LBID are correct and the LB was not deleted out-of-band","Check Scaleway status page for ongoing LB incidents","Increase the SDK retry config (Retry/timeout options on the Scaleway client) if timeouts recur"],"exampleFix":"// before: default wait options\n_, err = lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{LBID: lbID, Zone: zone})\n// after: longer retry budget via client options\nscwClient.Options = append(scwClient.Options, scw.WithDefaultRetryConfig(&scw.RetryConfig{MaxRetries: 10}))\n_, err = lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{LBID: lbID, Zone: zone})","handlingStrategy":"retry","validationCode":"// confirm LB exists and check its state before waiting\nlbs, err := lbService.ListLBs(&lb.ZonedAPIListLBsRequest{Zone: zone, Name: lbName}, scw.WithAllPages())\nif err != nil || lbs.TotalCount != 1 { return fmt.Errorf(\"LB %s not found in %s\", lbName, zone) }\nif lbs.LBs[0].Status != lb.LBStatusReady && lbs.LBs[0].Status != lb.LBStatusPending { return fmt.Errorf(\"unexpected LB status %s\", lbs.LBs[0].Status) }","typeGuard":null,"tryCatchPattern":"var serr *scw.ResponseError\nif errors.As(err, &serr) && (serr.Status == 429 || serr.Status >= 500) {\n    // transient: schedule a re-run instead of failing hard\n}","preventionTips":["Allow generous time windows for LB migrations on Scaleway","Never delete LBs out-of-band while kOps manages them","Pin the Scaleway SDK version with known-good retry defaults","Check Scaleway status page before large reconcile runs"],"tags":["scaleway","load-balancer","timeout","polling"],"backgroundTag":"resource-wait-timeout","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"}