{"record":{"id":"f7faf81bcdfac55e","repo":"kubernetes/kops","slug":"multiple-pools-found-for-name-s","errorCode":null,"errorMessage":"Multiple pools found for name %s","messagePattern":"Multiple pools found for name (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/lbpool.go","lineNumber":100,"sourceCode":"\nfunc (p *LBPool) Find(context *fi.CloudupContext) (*LBPool, error) {\n\tif p.Name == nil && p.ID == nil {\n\t\treturn nil, nil\n\t}\n\n\tcloud := context.T.Cloud.(openstack.OpenstackCloud)\n\tpoolList, err := cloud.ListPools(v2pools.ListOpts{\n\t\tID:   fi.ValueOf(p.ID),\n\t\tName: fi.ValueOf(p.Name),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to list pools: %v\", err)\n\t}\n\tif len(poolList) == 0 {\n\t\treturn nil, nil\n\t}\n\tif len(poolList) > 1 {\n\t\treturn nil, fmt.Errorf(\"Multiple pools found for name %s\", fi.ValueOf(p.Name))\n\t}\n\n\treturn NewLBPoolTaskFromCloud(cloud, p.Lifecycle, &poolList[0], p)\n}\n\nfunc (s *LBPool) Run(context *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(s, context)\n}\n\nfunc (_ *LBPool) CheckChanges(a, e, changes *LBPool) error {\n\tif a == nil {\n\t\tif e.Name == nil {\n\t\t\treturn fi.RequiredField(\"Name\")\n\t\t}\n\t} else {\n\t\tif changes.ID != nil {\n\t\t\treturn fi.CannotChangeField(\"ID\")\n\t\t}","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/lbpool.go#L82-L118","documentation":"LBPool.Find expects the name/ID filter to resolve to at most one pool; if ListPools returns more than one match it refuses to guess and returns this error. It protects reconciliation from mutating the wrong pool.","triggerScenarios":"Two or more Octavia pools share the name recorded in kops state (pool names are not enforced unique project-wide), and Find is called with only Name set (p.ID nil).","commonSituations":"Leftover pools from an aborted/previous cluster with the same cluster name; duplicate pools created manually or by another tool; reusing a cluster name after incomplete cleanup.","solutions":["List and inspect duplicates: openstack loadbalancer pool list | grep <name>, then delete the stale/orphan pool.","Disambiguate by fixing kops state to carry the pool ID so the filter matches exactly one.","Rename pools you own outside kops to avoid collisions with the kops-managed name.","Ensure unique cluster names per OpenStack project to prevent leftovers colliding."],"exampleFix":"// before: two pools named api-pool\n$ openstack loadbalancer pool delete <stale-pool-id> --wait\n// after\n$ kops update cluster --name mycluster --yes  # now resolves to a single pool","handlingStrategy":"validation","validationCode":"pools := octaviaPoolList(name)\nif len(pools) > 1 {\n\tids := poolIDs(pools)\n\treturn fmt.Errorf(\"project has %d pools named %q (%v); delete or rename duplicates before kops update\", len(pools), name, ids)\n}","typeGuard":null,"tryCatchPattern":"if err := kopsUpdate(); err != nil {\n\tif strings.Contains(err.Error(), \"Multiple pools found for name\") {\n\t\treturn dedupePoolsByName(extractName(err)) // interactive cleanup then retry\n\t}\n\treturn err\n}","preventionTips":["Use unique cluster names per OpenStack project.","Clean up leftovers after aborted cluster deletes (openstack loadbalancer pool list).","Pin pool IDs in kops state rather than relying on name lookups where possible."],"tags":["openstack","octavia","loadbalancer-pool","ambiguous-state"],"backgroundTag":"duplicate-resource-name","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"}