kubernetes/kops · error

Error getting image information: %v

Error message

Error getting image information: %v

What it means

Thrown by includeBootVolumeOptions (invoked from RenderOpenstack) when t.Cloud.GetImage fails while resolving the image used to build the boot-from-volume block device mapping. When metadata marks the instance as boot-from-volume, kOps must fetch the image (ID + MinDiskGigabytes) from Glance; any API failure here aborts server creation before the Nova call. This is a wrapper around the underlying gophercloud image error.

Source

Thrown at upup/pkg/fi/cloudup/openstacktasks/instance.go:432

	client := t.Cloud.NetworkingClient()

	_, err := l3floatingip.Update(context.TODO(), client, fi.ValueOf(e.FloatingIP.ID), l3floatingip.UpdateOpts{
		PortID: e.Port.ID,
	}).Extract()
	if err != nil {
		return fmt.Errorf("failed to associated floating IP to instance %s: %v", *e.Name, err)
	}
	return nil
}

func includeBootVolumeOptions(t *openstack.OpenstackAPITarget, e *Instance, opts servers.CreateOpts) (servers.CreateOpts, error) {
	if !bootFromVolume(e.Metadata) {
		return opts, nil
	}

	i, err := t.Cloud.GetImage(fi.ValueOf(e.Image))
	if err != nil {
		return servers.CreateOpts{}, fmt.Errorf("Error getting image information: %v", err)
	}

	blockDevice := servers.BlockDevice{
		BootIndex:           0,
		DeleteOnTermination: true,
		DestinationType:     "volume",
		SourceType:          "image",
		UUID:                i.ID,
		VolumeSize:          i.MinDiskGigabytes,
	}

	if s, ok := e.Metadata[openstack.BOOT_VOLUME_SIZE]; ok {
		i, err := strconv.ParseInt(s, 10, 64)
		if err != nil {
			return servers.CreateOpts{}, fmt.Errorf("Invalid value for %v: %v", openstack.BOOT_VOLUME_SIZE, err)
		}

		blockDevice.VolumeSize = int(i)

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the image exists: `openstack image list | grep <image>` and correct the image name/ID in the cluster spec
  2. Confirm the glance endpoint is registered: `openstack endpoint list --service image`
  3. Re-authenticate (check OS_* credentials / token expiry) and rerun `kops update cluster`
  4. If the image is private, ensure the project has access or make it shared/public
  5. Retry if the failure was a transient 5xx; check the cloud provider status page

Example fix

// before
image: my-custom-image-v1   # deleted from Glance
// after
image: my-custom-image-v2   # exists: `openstack image list --name my-custom-image-v2`
Defensive patterns

Strategy: validation

Validate before calling

// resolve the image before entering boot-from-volume path
func resolveImage(t *openstack.OpenstackAPITarget, imageName string) error {
	_, err := t.Cloud.GetImage(imageName)
	if err != nil {
		return fmt.Errorf("image %q unresolvable via Glance: %w", imageName, err)
	}
	return nil
}

Type guard

func isImageNotFound(err error) bool {
	var _, nf gophercloud.ErrDefault404
	return errors.As(err, &nf) || strings.Contains(err.Error(), "No image with a name or ID")
}

Prevention

When it happens

Trigger: Cloud.GetImage(e.Image) errors during a boot-from-volume apply: image name not found in Glance, image ID invalid, 401 auth failure on the image service endpoint, Glance endpoint misconfigured/absent in the catalog, or transient 5xx from the image API.

Common situations: Cluster spec references an image name that was deleted or renamed in the region; typos in the image field; operating across regions where the image exists only elsewhere; Glance service endpoint not registered in Keystone catalog; expired token before the image lookup.

Related errors


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