kubernetes/kops · error

failed to list storage availability zones: %v

Error message

failed to list storage availability zones: %v

What it means

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.

Source

Thrown at upup/pkg/fi/cloudup/openstack/availability_zone.go:37

import (
	"context"
	"fmt"

	"github.com/gophercloud/gophercloud/v2"
	az "github.com/gophercloud/gophercloud/v2/openstack/compute/v2/availabilityzones"
	"k8s.io/apimachinery/pkg/util/wait"
	"k8s.io/kops/util/pkg/vfs"
)

func (c *openstackCloud) ListAvailabilityZones(serviceClient *gophercloud.ServiceClient) (azList []az.AvailabilityZone, err error) {
	return listAvailabilityZones(c, serviceClient)
}

func listAvailabilityZones(c OpenstackCloud, serviceClient *gophercloud.ServiceClient) (azList []az.AvailabilityZone, err error) {
	done, err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {
		azPage, err := az.List(serviceClient).AllPages(context.TODO())
		if err != nil {
			return false, fmt.Errorf("failed to list storage availability zones: %v", err)
		}
		azList, err = az.ExtractAvailabilityZones(azPage)
		if err != nil {
			return false, fmt.Errorf("failed to extract storage availability zones: %v", err)
		}
		return true, nil
	})
	if !done {

		if err == nil {
			err = wait.ErrWaitTimeout
		}
		return azList, err
	}
	return azList, nil
}

func (c *openstackCloud) GetStorageAZFromCompute(computeAZ string) (*az.AvailabilityZone, error) {

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify OpenStack credentials (openstack compute availability zone list works with your RC/clouds.yaml)
  2. Check the compute service endpoint exists and is enabled in the service catalog
  3. Check Nova service health and network reachability to the endpoint
  4. Re-run after transient failures — the operation is already retried with backoff

Example fix

// before
export OS_AUTH_URL=https://wrong-host:5000/v3
// after
source openrc  # correct OS_AUTH_URL/OS_USERNAME/OS_PROJECT/OS_PASSWORD
Defensive patterns

Strategy: retry

Validate before calling

// verify OpenStack access before running kops
out, err := exec.Command("openstack", "compute", "availability", "zone", "list").CombinedOutput()
if err != nil {
    return fmt.Errorf("openstack credentials/endpoint broken: %s", out)
}

Try / catch

err := vfs.RetryWithBackoff(readBackoff, func() (bool, error) {
    pages, err := az.List(sc).AllPages(ctx)
    if err != nil {
        return false, fmt.Errorf("failed to list storage availability zones: %v", err)
    }
    return true, nil
})
if err != nil { /* surface after retries exhausted */ }

Prevention

When it happens

Trigger: 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.

Common situations: Wrong OS_* environment variables / clouds.yaml; keystone token expired; the compute endpoint disabled in the service catalog; OpenStack API throttling after retries exhausted.

Related errors


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/48d795f4cc9d8866. Report an issue: GitHub.