{"record":{"id":"cb7a57f83ef04989","repo":"kubernetes/kops","slug":"error-creating-lb-pool-v","errorCode":null,"errorMessage":"error creating LB pool: %v","messagePattern":"error creating LB pool: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/lbpool.go","lineNumber":147,"sourceCode":"\t\t// wait that lb is in ACTIVE state\n\t\tprovisioningStatus, err := waitLoadbalancerActiveProvisioningStatus(t.Cloud.LoadBalancerClient(), fi.ValueOf(e.Loadbalancer.ID))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to loadbalancer ACTIVE provisioning status %v: %v\", provisioningStatus, err)\n\t\t}\n\n\t\tLbMethod := v2pools.LBMethodRoundRobin\n\t\tif fi.ValueOf(e.Loadbalancer.Provider) == \"ovn\" {\n\t\t\tLbMethod = v2pools.LBMethodSourceIpPort\n\t\t}\n\t\tpoolopts := v2pools.CreateOpts{\n\t\t\tName:           fi.ValueOf(e.Name),\n\t\t\tLBMethod:       LbMethod,\n\t\t\tProtocol:       v2pools.ProtocolTCP,\n\t\t\tLoadbalancerID: fi.ValueOf(e.Loadbalancer.ID),\n\t\t}\n\t\tpool, err := t.Cloud.CreatePool(poolopts)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"error creating LB pool: %v\", err)\n\t\t}\n\t\te.ID = new(pool.ID)\n\n\t\treturn nil\n\t}\n\n\tklog.V(2).Infof(\"Openstack task LB::RenderOpenstack did nothing\")\n\treturn nil\n}\n","sourceCodeStart":129,"sourceCodeEnd":157,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/lbpool.go#L129-L157","documentation":"After the parent LB is ACTIVE, RenderOpenstack calls t.Cloud.CreatePool (POST /v2/lbaas/pools) and wraps any API failure. Common rejects are validation of protocol/LB method, quota limits, or the LB having moved out of ACTIVE state between the wait and the create.","triggerScenarios":"CreatePool fails with 409 because LB is not ACTIVE (race), 403/413 quota exceeded (pools per LB/project), or invalid CreateOpts — e.g. unsupported LBMethod for the provider (SOURCE_IP_PORT only valid for ovn) or protocol mismatch.","commonSituations":"Projects at Octavia pool quota; concurrent operations flipping the LB back to PENDING_*; octavia-ovn provider rejecting ROUND_ROBIN; misconfigured provider string in the cluster spec.","solutions":["Read the wrapped error: 409 → re-run after LB is ACTIVE; 403/413 → raise pool quotas; 400 → fix CreateOpts/provider mismatch.","For ovn provider, ensure LBMethod SOURCE_IP_PORT is used (kOps does this automatically — check the provider is correctly detected).","Check/raise quotas: openstack quota show --load-balancer; remove unused pools.","Re-run kops update once no other LB mutations are in flight to avoid ACTIVE-state races."],"exampleFix":"// before: round-robin rejected by ovn\nLBMethod: v2pools.LBMethodRoundRobin  // provider=ovn\n// after\nLbMethod := v2pools.LBMethodRoundRobin\nif fi.ValueOf(e.Loadbalancer.Provider) == \"ovn\" {\n\tLbMethod = v2pools.LBMethodSourceIpPort\n}","handlingStrategy":"validation","validationCode":"if poolsUsed >= poolQuota { return fmt.Errorf(\"octavia pool quota exceeded for project\") }\nif provider == \"ovn\" && lbMethod != \"SOURCE_IP_PORT\" {\n\treturn fmt.Errorf(\"provider ovn requires SOURCE_IP_PORT LB method\")\n}","typeGuard":null,"tryCatchPattern":"if err := kopsUpdate(); err != nil {\n\tvar apiErr gophercloud.ErrUnexpectedResponseCode\n\tif errors.As(err, &apiErr) {\n\t\tswitch apiErr.StatusCode {\n\t\tcase 409: return backoffAndRetry()          // LB left ACTIVE\n\t\tcase 403, 413: return raiseQuotaAndRetry()  // quota\n\t\tcase 400: return fixSpecAndRetry()          // validation\n\t\t}\n\t}\n\treturn err\n}","preventionTips":["Keep pool quotas above the number of pools kOps will create (API LB + bastions).","Match LBMethod to the octavia provider (ovn needs SOURCE_IP_PORT).","Run updates serially so the LB stays ACTIVE between dependent creations."],"tags":["openstack","octavia","loadbalancer-pool","api-error"],"backgroundTag":"octavia-pool-create-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"}