Jump to: navigation, search

RetainGlanceMetadata

Summary

When creating a bootable volume from a commercial image, it is proposed that the Glance metadata stored for the original image be retained by Cinder. This data need not be accessible by the end user. The intent is to retain licensing and charging information for the billing system.

Further to this, when cloning a volume with retained metadata, the metadata should also be stored for the clone. The clone copy may extend the metadata, but the core Glance data should remain unaltered. Again the intent is to track clone instances and bill correctly for licensed images.

Release Note

The end-user impact should be minimal. Ideally if the source image is licensed in a different way, such as a per-instance license fee or per-hour usage fee, this should be reflected in the describe-volume API so the user can clearly see that instances booted from the volume will be charged at an alternate rate. The simplest way to achieve this is to display the metadata in raw (and read-only) form. If using the Glance alternative, then there are no end-user changes as the information is retained in Glance.

Rationale

There is a requirement for cloud providers to be able to charge additional fees on a per-instance or per-usage rate for certain images. For example, a commercial cloud appliance, or an operating system which has a usage or licensing charge. The intent is to save this metadata in the Cinder/nova-volumes table, and to pass this data on to the billing subsystem as needed.

User stories

  • The user creates a bootable volume from an image.
  • The source of the volume and the Glance metadata are retained by Cinder.
  • Once an instance is booted from this volume, a billing record is created, referencing the Glance metadata.
  • If the volume is cloned, the metadata stored by Cinder is also cloned.

Assumptions

Design

Implementation

A new table needs to be created in the Cinder database, with the name volume_glance_metadata with the following structure:

id
volume_id
key
value

The table will retain the Glance metadata as a series of key = value pairs and has a many-to-one relationship with the volumes table.

Migration

Unresolved issues