{"record":{"id":"c9690d4984cd3ccb","repo":"kubernetes/kops","slug":"newlblistenertaskfromcloud-failed-to-fetch-pool","errorCode":null,"errorMessage":"NewLBListenerTaskFromCloud: failed to fetch pool %s: %v","messagePattern":"NewLBListenerTaskFromCloud: failed to fetch pool (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/poolassociation.go","lineNumber":105,"sourceCode":"\tvar found *v2pools.Member\n\tfor _, member := range a.Members {\n\t\tpoolMember, err := cloud.GetPoolMember(a.ID, member.ID)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tif fi.ValueOf(p.Name) == poolMember.Name {\n\t\t\tfound = poolMember\n\t\t\tbreak\n\t\t}\n\t}\n\t// if not found it is created by returning nil, nil\n\t// this is needed for instance in initial installation\n\tif found == nil {\n\t\treturn nil, nil\n\t}\n\tpool, err := NewLBPoolTaskFromCloud(cloud, p.Lifecycle, &a, nil)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"NewLBListenerTaskFromCloud: failed to fetch pool %s: %v\", fi.ValueOf(pool.Name), err)\n\t}\n\n\tactual := &PoolAssociation{\n\t\tID:            new(found.ID),\n\t\tName:          new(found.Name),\n\t\tPool:          pool,\n\t\tServerPrefix:  p.ServerPrefix,\n\t\tClusterName:   p.ClusterName,\n\t\tInterfaceName: p.InterfaceName,\n\t\tProtocolPort:  p.ProtocolPort,\n\t\tLifecycle:     p.Lifecycle,\n\t\tWeight:        new(found.Weight),\n\t}\n\tp.ID = actual.ID\n\treturn actual, nil\n}\n\nfunc (s *PoolAssociation) Run(context *fi.CloudupContext) error {","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/poolassociation.go#L87-L123","documentation":"After locating the pool and its member, PoolAssociation.Find calls NewLBPoolTaskFromCloud to reconstruct the pool task from cloud state. If that conversion fails, kOps wraps the failure (note the message misleadingly says 'NewLBListenerTaskFromCloud') and aborts Find, so the PoolAssociation's actual state cannot be computed.","triggerScenarios":"NewLBPoolTaskFromCloud(cloud, p.Lifecycle, &a, nil) errors while rebuilding the pool task: the pool's parent loadbalancer/listener referenced by the cloud pool is missing or fetches fail, or Octavia returns an error reading pool detail (404 on a dangling pool, API failure).","commonSituations":"Loadbalancer was deleted out-of-band while its pool remains; Octavia API outage or throttling during reconcile; Octavia version mismatch where pool detail fields differ from what the kops task builder expects.","solutions":["Read the wrapped %v error to see which sub-resource fetch failed (listener/loadbalancer lookup vs pool detail)","Verify the pool's parent loadbalancer exists (`openstack loadbalancer show <lb-id>`); clean up orphaned pools if not","Retry `kops update cluster` if Octavia returned a transient 5xx/429","Confirm kops and the cluster's Octavia API versions are compatible (upgrade Octavia or kops)"],"exampleFix":"// before: orphaned pool whose loadbalancer was deleted manually\nopenstack loadbalancer pool delete <orphan-pool-id>\n// after: let kops recreate loadbalancer + pool consistently","handlingStrategy":"fallback","validationCode":"// verify the pool's parent loadbalancer exists before reconcile\nout, err := exec.Command(\"openstack\", \"loadbalancer\", \"list\").Output()\nif err != nil { return err }\n// if the pool exists but its LB is absent, delete the orphaned pool first","typeGuard":"func isNotFound(err error) bool {\n\tvar gerr gophercloud.ErrUnexpectedResponseCode\n\treturn errors.As(err, &gerr) && gerr.Actual == 404\n}","tryCatchPattern":"pool, err := NewLBPoolTaskFromCloud(cloud, lifecycle, &a, nil)\nif err != nil {\n\tif isNotFound(err) {\n\t\t// parent LB gone: treat association as absent and recreate\n\t\treturn nil, nil\n\t}\n\treturn nil, fmt.Errorf(\"failed to fetch pool: %v\", err)\n}","preventionTips":["Never delete Octavia loadbalancers directly; let kops manage their lifecycle","Check `openstack loadbalancer list` consistency before running updates","Keep Octavia API version compatible with your kops release"],"tags":["openstack","octavia","loadbalancer","reconcile"],"backgroundTag":"loadbalancer-orphaned-resource","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"}