{"record":{"id":"48d795f4cc9d8866","repo":"kubernetes/kops","slug":"failed-to-list-storage-availability-zones-v","errorCode":null,"errorMessage":"failed to list storage availability zones: %v","messagePattern":"failed to list storage availability zones: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"upup/pkg/fi/cloudup/openstack/availability_zone.go","lineNumber":37,"sourceCode":"import (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/gophercloud/gophercloud/v2\"\n\taz \"github.com/gophercloud/gophercloud/v2/openstack/compute/v2/availabilityzones\"\n\t\"k8s.io/apimachinery/pkg/util/wait\"\n\t\"k8s.io/kops/util/pkg/vfs\"\n)\n\nfunc (c *openstackCloud) ListAvailabilityZones(serviceClient *gophercloud.ServiceClient) (azList []az.AvailabilityZone, err error) {\n\treturn listAvailabilityZones(c, serviceClient)\n}\n\nfunc listAvailabilityZones(c OpenstackCloud, serviceClient *gophercloud.ServiceClient) (azList []az.AvailabilityZone, err error) {\n\tdone, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n\t\tazPage, err := az.List(serviceClient).AllPages(context.TODO())\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to list storage availability zones: %v\", err)\n\t\t}\n\t\tazList, err = az.ExtractAvailabilityZones(azPage)\n\t\tif err != nil {\n\t\t\treturn false, fmt.Errorf(\"failed to extract storage availability zones: %v\", err)\n\t\t}\n\t\treturn true, nil\n\t})\n\tif !done {\n\n\t\tif err == nil {\n\t\t\terr = wait.ErrWaitTimeout\n\t\t}\n\t\treturn azList, err\n\t}\n\treturn azList, nil\n}\n\nfunc (c *openstackCloud) GetStorageAZFromCompute(computeAZ string) (*az.AvailabilityZone, error) {","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/kubernetes/kops/blob/4c8573c808a73d578c5eadc86d410646ea0b0d73/upup/pkg/fi/cloudup/openstack/availability_zone.go#L19-L55","documentation":"listAvailabilityZones in the Openstack cloud provider lists compute availability zones via gophercloud; if the az.List paginated call fails inside the vfs.RetryWithBackoff wrapper it returns 'failed to list storage availability zones'. The retry wrapper retries transient failures before surfacing this error.","triggerScenarios":"kOps OpenStack cluster operations that enumerate AZs when the Nova compute API call fails: expired/insufficient OpenStack credentials, missing compute service endpoint, network issues, or Nova outage.","commonSituations":"Wrong OS_* environment variables / clouds.yaml; keystone token expired; the compute endpoint disabled in the service catalog; OpenStack API throttling after retries exhausted.","solutions":["Verify OpenStack credentials (openstack compute availability zone list works with your RC/clouds.yaml)","Check the compute service endpoint exists and is enabled in the service catalog","Check Nova service health and network reachability to the endpoint","Re-run after transient failures — the operation is already retried with backoff"],"exampleFix":"// before\nexport OS_AUTH_URL=https://wrong-host:5000/v3\n// after\nsource openrc  # correct OS_AUTH_URL/OS_USERNAME/OS_PROJECT/OS_PASSWORD","handlingStrategy":"retry","validationCode":"// verify OpenStack access before running kops\nout, err := exec.Command(\"openstack\", \"compute\", \"availability\", \"zone\", \"list\").CombinedOutput()\nif err != nil {\n    return fmt.Errorf(\"openstack credentials/endpoint broken: %s\", out)\n}","typeGuard":null,"tryCatchPattern":"err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {\n    pages, err := az.List(sc).AllPages(ctx)\n    if err != nil {\n        return false, fmt.Errorf(\"failed to list storage availability zones: %v\", err)\n    }\n    return true, nil\n})\nif err != nil { /* surface after retries exhausted */ }","preventionTips":["Validate OS_* env/clouds.yaml in CI before runs","Refresh tokens for long jobs","Confirm compute endpoint is enabled in the catalog"],"tags":["openstack","availability-zones","api-error"],"backgroundTag":"openstack-api-call-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"}