{"record":{"id":"718c98ed1a8deaa2","repo":"kubernetes/kops","slug":"failed-to-extract-images-v","errorCode":null,"errorMessage":"failed to extract images: %v","messagePattern":"failed to extract images: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/image.go","lineNumber":40,"sourceCode":"\n\t\"github.com/gophercloud/gophercloud/v2/openstack/image/v2/images\"\n)\n\nfunc (c *openstackCloud) GetImage(name string) (*images.Image, error) {\n\treturn getImage(c, name)\n}\n\nfunc getImage(c OpenstackCloud, name string) (*images.Image, error) {\n\topts := images.ListOpts{Name: name}\n\tpager := images.List(c.ImageClient(), opts)\n\tpage, err := pager.AllPages(context.TODO())\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to list images: %v\", err)\n\t}\n\n\ti, err := images.ExtractImages(page)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to extract images: %v\", err)\n\t}\n\n\tswitch len(i) {\n\tcase 1:\n\t\treturn &i[0], nil\n\tcase 0:\n\t\treturn nil, fmt.Errorf(\"no image found with name %v\", name)\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"multiple images found with name %v\", name)\n\t}\n}\n","sourceCodeStart":22,"sourceCodeEnd":52,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/image.go#L22-L52","documentation":"getImage wraps the images.ExtractImages failure after fetching pages, i.e. the Glance response could not be parsed into Image objects. It fires on malformed API responses, aborting image resolution before the name-match switch.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstack/image.go:40 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the image lookup; likely a transient or API-response issue","Check gophercloud/Glance version compatibility","Inspect the wrapped error for response-format anomalies"],"exampleFix":null,"handlingStrategy":"retry","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"}