{"record":{"id":"a0906c105e073585","repo":"kubernetes/kops","slug":"failed-to-list-images-v","errorCode":null,"errorMessage":"failed to list images: %v","messagePattern":"failed to list images: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/image.go","lineNumber":35,"sourceCode":"package openstack\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\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":17,"sourceCodeEnd":52,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/image.go#L17-L52","documentation":"getImage wraps the images.List AllPages failure when querying the Glance image service by name. It fires when the image list API call fails (auth, endpoint, network), preventing kOps from resolving the cluster image.","triggerScenarios":"Thrown at upup/pkg/fi/cloudup/openstack/image.go:35 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check Glance (Image) API credentials and endpoint configuration","Verify the image service is reachable from the environment","Fix the image name/query if the request is malformed"],"exampleFix":null,"handlingStrategy":"try-catch","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"}