kubernetes/kops · error

Failed to get storage availability zone: %s

Error message

Failed to get storage availability zone: %s

What it means

Mapping the task's compute availability zone to a storage (Cinder) availability zone failed while creating a PersistentVolume. The wrapped error means the compute AZ has no matching storage AZ visible to the credentials.

Source

Thrown at upup/pkg/fi/cloudup/openstacktasks/volume.go:129

			return fi.CannotChangeField("AvailabilityZone")
		}
		if changes.VolumeType != nil {
			return fi.CannotChangeField("VolumeType")
		}
		if changes.SizeGB != nil {
			return fi.CannotChangeField("SizeGB")
		}
	}
	return nil
}

func (_ *Volume) RenderOpenstack(t *openstack.OpenstackAPITarget, a, e, changes *Volume) error {
	if a == nil {
		klog.V(2).Infof("Creating PersistentVolume with Name:%q", fi.ValueOf(e.Name))

		storageAZ, err := t.Cloud.GetStorageAZFromCompute(fi.ValueOf(e.AvailabilityZone))
		if err != nil {
			return fmt.Errorf("Failed to get storage availability zone: %s", err)
		}

		opt := cinderv3.CreateOpts{
			Size:             int(*e.SizeGB),
			AvailabilityZone: storageAZ.ZoneName,
			Metadata:         e.Tags,
			Name:             fi.ValueOf(e.Name),
			VolumeType:       fi.ValueOf(e.VolumeType),
		}

		v, err := t.Cloud.CreateVolume(opt)
		if err != nil {
			return fmt.Errorf("error creating PersistentVolume: %v", err)
		}

		e.ID = new(v.ID)
		e.AvailabilityZone = new(v.AvailabilityZone)
		return nil

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Compare openstack availability zone list (compute) with volume availability zones
  2. Choose an availability zone where both compute and storage exist
  3. Retry with the corrected AZ
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/openstacktasks/volume.go:129 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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