{"record":{"id":"8d1fc33a3600a130","repo":"kubernetes/kops","slug":"multiple-load-balancers-for-name-s","errorCode":null,"errorMessage":"Multiple load balancers for name %s","messagePattern":"Multiple load balancers for name (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/lb.go","lineNumber":168,"sourceCode":"\t\treturn nil, nil\n\t}\n\n\tcloud := context.T.Cloud.(openstack.OpenstackCloud)\n\tlbPage, err := loadbalancers.List(cloud.LoadBalancerClient(), loadbalancers.ListOpts{\n\t\tName: fi.ValueOf(s.Name),\n\t}).AllPages(context.Context())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to retrieve loadbalancers for name %s: %v\", fi.ValueOf(s.Name), err)\n\t}\n\tlbs, err := loadbalancers.ExtractLoadBalancers(lbPage)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to extract loadbalancers : %v\", err)\n\t}\n\tif len(lbs) == 0 {\n\t\treturn nil, nil\n\t}\n\tif len(lbs) > 1 {\n\t\treturn nil, fmt.Errorf(\"Multiple load balancers for name %s\", fi.ValueOf(s.Name))\n\t}\n\n\treturn NewLBTaskFromCloud(cloud, s.Lifecycle, &lbs[0], s)\n}\n\nfunc (s *LB) Run(context *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(s, context)\n}\n\nfunc (_ *LB) CheckChanges(a, e, changes *LB) 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":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/lb.go#L150-L186","documentation":"More than one Octavia load balancer exists with the task's name. The name-to-LB mapping must be unique for discovery; duplicates usually come from manual LB creation or leftovers from a previous cluster with the same name.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstacktasks/lb.go:168 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List load balancers with the name and identify duplicates","Delete the stale load balancer","Re-run discovery once the name is unique"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}