{"record":{"id":"b8dc48eacc91e159","repo":"kubernetes/kops","slug":"failed-to-list-loadbalancer-listeners-for-name-s","errorCode":null,"errorMessage":"Failed to list loadbalancer listeners for name %s: %v","messagePattern":"Failed to list loadbalancer listeners for name (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstacktasks/lblistener.go","lineNumber":113,"sourceCode":"\t\tfind.ID = listenerTask.ID\n\t\tfind.Name = listenerTask.Name\n\t\tfind.Pool = listenerTask.Pool\n\t}\n\treturn listenerTask, nil\n}\n\nfunc (s *LBListener) Find(context *fi.CloudupContext) (*LBListener, error) {\n\tif s.Name == nil {\n\t\treturn nil, nil\n\t}\n\n\tcloud := context.T.Cloud.(openstack.OpenstackCloud)\n\tlistenerList, err := cloud.ListListeners(listeners.ListOpts{\n\t\tID:   fi.ValueOf(s.ID),\n\t\tName: fi.ValueOf(s.Name),\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"Failed to list loadbalancer listeners for name %s: %v\", fi.ValueOf(s.Name), err)\n\t}\n\tif len(listenerList) == 0 {\n\t\treturn nil, nil\n\t}\n\tif len(listenerList) > 1 {\n\t\treturn nil, fmt.Errorf(\"Multiple listeners found with name %s\", fi.ValueOf(s.Name))\n\t}\n\n\treturn NewLBListenerTaskFromCloud(cloud, s.Lifecycle, &listenerList[0], s)\n}\n\nfunc (s *LBListener) Run(context *fi.CloudupContext) error {\n\treturn fi.CloudupDefaultDeltaRunMethod(s, context)\n}\n\nfunc (_ *LBListener) CheckChanges(a, e, changes *LBListener) error {\n\tif a == nil {\n\t\tif e.Name == nil {","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstacktasks/lblistener.go#L95-L131","documentation":"Listing Octavia listeners filtered by ID and name failed at the API level during listener task discovery. The wrapped error carries the concrete API failure.","triggerScenarios":"`kops update cluster`/`kops get` on a cluster where the Octavia listener list API returns an error — Octavia endpoint unreachable, 403 on the lbaas API, auth token expired, or catalog missing the octavia service.","commonSituations":"Octavia not deployed in the cloud/region (no endpoint for load-balancer service); expired OpenStack credentials; network/firewall blocking the API; wrong OS_* region configured.","solutions":[],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-flight: can this credential list Octavia listeners at all?\nopenstack loadbalancer listener list >/dev/null || { echo 'octavia API unreachable'; exit 1; }","typeGuard":null,"tryCatchPattern":"listenerList, err := cloud.ListListeners(listeners.ListOpts{...})\nif err != nil {\n    var gerr gophercloud.ErrUnexpectedResponseCode\n    if errors.As(err, &gerr) && (gerr.StatusCode == 429 || gerr.StatusCode >= 500 || gerr.StatusCode == 401) {\n        // 401: refresh token then retry; 5xx/429: backoff\n        return nil, retry.After(backoff, err)\n    }\n    return nil, fmt.Errorf(\"Failed to list loadbalancer listeners for name %s: %w\", name, err)\n}","preventionTips":["Confirm the octavia service/endpoint exists in the target region before provisioning","Refresh OpenStack credentials (tokens expire) before long update runs","Check network reachability to the load-balancer endpoint from the machine running kops"],"tags":["openstack","octavia","api-error","find"],"backgroundTag":"cloud-api-request-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"}