{"record":{"id":"8553968324765c43","repo":"kubernetes/kops","slug":"waiting-for-load-balancer-s-w-855396","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_frontend.go","lineNumber":169,"sourceCode":"\t\t\tLBID:        fi.ValueOf(expected.LoadBalancer.LBID),\n\t\t\tName:        fi.ValueOf(expected.Name),\n\t\t\tInboundPort: fi.ValueOf(expected.InboundPort),\n\t\t\tBackendID:   fi.ValueOf(expected.LBBackend.ID),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"creating front-end for load-balancer %s: %w\", fi.ValueOf(expected.LoadBalancer.Name), err)\n\t\t}\n\n\t\texpected.ID = &frontendCreated.ID\n\n\t}\n\n\t_, err := lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{\n\t\tLBID: fi.ValueOf(expected.LoadBalancer.LBID),\n\t\tZone: scw.Zone(fi.ValueOf(expected.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 terraformLBFrontend struct {\n\tBackendID   *terraformWriter.Literal `cty:\"backend_id\"`\n\tLBID        *terraformWriter.Literal `cty:\"lb_id\"`\n\tName        *string                  `cty:\"name\"`\n\tInboundPort *int32                   `cty:\"inbound_port\"`\n}\n\nfunc (_ *LBFrontend) RenderTerraform(t *terraform.TerraformTarget, actual, expected, changes *LBFrontend) error {\n\ttf := terraformLBFrontend{\n\t\tLBID:        expected.LoadBalancer.TerraformLink(),\n\t\tBackendID:   expected.LBBackend.TerraformLink(),\n\t\tName:        expected.Name,\n\t\tInboundPort: expected.InboundPort,","sourceCodeStart":151,"sourceCodeEnd":187,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/scalewaytasks/lb_frontend.go#L151-L187","documentation":"kOps wraps failures from `lbService.WaitForLb` after creating/updating a front-end; the SDK polls the LB until it is stable. If the LB never becomes ready in the retry budget or the polling calls fail, this error is returned from RenderScw of LoadBalancerFrontend.","triggerScenarios":"After CreateFrontend/UpdateFrontend, RenderScw calls WaitForLb with expected.LoadBalancer.LBID and Zone=expected.Zone; polling fails due to API errors, wrong zone, deleted LB, or the LB stays in a pending/migrating state beyond the timeout.","commonSituations":"Front-end changes triggering LB migration longer than the SDK's wait budget; LB deleted out-of-band mid-reconcile; zone field missing/wrong in the task spec; Scaleway API incident.","solutions":["Rerun `kops update cluster` after giving the LB time to stabilize","Check LB status in the Scaleway console; recreate if permanently stuck","Verify expected.Zone is set and matches the LB's actual zone","Check Scaleway status page for LB incidents","Increase Scaleway client retry/timeout configuration if timeouts recur"],"exampleFix":"// before: default wait\n_, err := lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{LBID: lbID, Zone: zone})\n// after: bound with explicit retry and clearer error\nerr = retry.Do(func() error {\n    _, err := lbService.WaitForLb(&lb.ZonedAPIWaitForLBRequest{LBID: lbID, Zone: zone})\n    return err\n}, retry.Attempts(5), retry.Delay(15*time.Second))","handlingStrategy":"retry","validationCode":"// verify LB exists in expected zone before waiting\nlbs, err := lbService.ListLBs(&lb.ZonedAPIListLBsRequest{Zone: scw.Zone(fi.ValueOf(expected.Zone)), Name: lbName}, scw.WithAllPages())\nif err != nil || lbs.TotalCount != 1 { return fmt.Errorf(\"LB %s not found in zone %s\", lbName, fi.ValueOf(expected.Zone)) }","typeGuard":null,"tryCatchPattern":"var serr *scw.ResponseError\nif errors.As(err, &serr) && (serr.Status == 429 || serr.Status >= 500) {\n    // transient: safe to re-run kops update cluster later\n}","preventionTips":["Always set Zone explicitly on the frontend task spec","Expect longer LB stabilization after frontend changes and schedule accordingly","Keep the Scaleway SDK retry budget adequate for your region","Monitor Scaleway status page during reconcile"],"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"}