{"record":{"id":"40fcdc7571a925e4","repo":"kubernetes/kops","slug":"failed-to-extract-listeners-v","errorCode":null,"errorMessage":"failed to extract listeners: %v","messagePattern":"failed to extract listeners: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/loadbalancer.go","lineNumber":530,"sourceCode":"}\n\nfunc (c *openstackCloud) ListListeners(opts listeners.ListOpts) (listenerList []listeners.Listener, err error) {\n\treturn listListeners(c, opts)\n}\n\nfunc listListeners(c OpenstackCloud, opts listeners.ListOpts) (listenerList []listeners.Listener, err error) {\n\tif c.LoadBalancerClient() == nil {\n\t\treturn listenerList, fmt.Errorf(\"loadbalancer support not available in this deployment\")\n\t}\n\n\tdone, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n\t\tlistenerPage, err := listeners.List(c.LoadBalancerClient(), opts).AllPages(context.TODO())\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to list listeners: %v\", err)\n\t\t}\n\t\tlistenerList, err = listeners.ExtractListeners(listenerPage)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to extract listeners: %v\", err)\n\t\t}\n\t\treturn true, nil\n\t})\n\tif !done {\n\t\tif err == nil {\n\t\t\terr = wait.ErrWaitTimeout\n\t\t}\n\t\treturn listenerList, err\n\t}\n\treturn listenerList, nil\n}\n\nfunc (c *openstackCloud) CreateListener(opts listeners.CreateOpts) (listener *listeners.Listener, err error) {\n\treturn createListener(c, opts)\n}\n\nfunc createListener(c OpenstackCloud, opts listeners.CreateOpts) (listener *listeners.Listener, err error) {\n\tif c.LoadBalancerClient() == nil {","sourceCodeStart":512,"sourceCodeEnd":548,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/loadbalancer.go#L512-L548","documentation":"Wraps a failure from listeners.ExtractListeners in listListeners. The listener-list response could not be decoded into []listeners.Listener — the JSON body deviates from the expected gophercloud schema.","triggerScenarios":"listeners.ExtractListeners(listenerPage) errors after paging succeeds: HTML/invalid JSON body from a proxy, unknown field types from a mismatched Octavia version, or an embedded error document within the page.","commonSituations":"Octavia microversion newer than the pinned gophercloud version; middleware rewriting responses; truncated chunked transfer from a broken LB in front of the API.","solutions":["Inspect the raw /v2/lbaas/listeners response body for the malformed portion","Upgrade gophercloud (go get + make gomod) to a release matching your Octavia version","Eliminate proxies/middleware that mutate the API response body","Retry the operation if the response was transiently truncated"],"exampleFix":"null","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"ll, err := listListeners(c, opts)\nif err != nil {\n\tif strings.Contains(err.Error(), \"failed to extract listeners\") {\n\t\treturn fmt.Errorf(\"octavia listener payload undecodable: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Upgrade gophercloud when upgrading Octavia","Log raw response bodies on extraction failure for diagnosis","Block proxies that inject HTML into API responses"],"tags":["openstack","octavia","json","unmarshal"],"backgroundTag":"json-unmarshal-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"}