Nova Image Notes

Image Implementation In a Nutshell

The system currently provides two backends for retrieving images:

The Node-local Store appears to be a convenience for testing and perhaps for use by an Ops team when it goes live, whereas, S3 provides a registration mechanism (with hints at Image sharing) that would be exposed to customers.

An Unregistered Image is mapped to a bucket in the S3 object store. Within the bucket is:

The Image is Registered by calling endpoints/node.py/register() which in turn issues a PUT request to the object store. Contained within the PUT request is:

The S3-ObjectStore handler (objectstore/handler.py) receives the PUT request and forks of a process to continue the registration process (Image.create found in objectstore/image.py) which includes:

The state of the Image is contained with the JSON manifest which is updated as the image progresses through the unpacking process. Eventually the image reaches the 'available' status and is said to be 'registered'.

Now that the image is registered, the spawn method of compute/node.py can use curl to fetch the image from the objectstore (util.fetchfile) to instantiate a new VM.

It should be noted both the consumer (node.py) and the provider (Image API/objectstore) think of images as having a type:

So, in order spawn a VM Nova you really need to specify *three* images, one of each type.

What the Implementation Gets Right

Where the Implemenation Needs Work

What the Implmentation Gets Wrong

Ideas for Improvement

* Use Pyfilesystem to store Images. This would provide support for:

* Add a caching layer. This could be:

* Create robust Image registry. This would:

* There is no need to fetch Images from external storage, if network distributed filesystem (GlusterFS) or over the network block device (NBD or SheepDog) is used. It would be nice to support also those solutions (at least by friendly architecture, so they can be developed by 3rd party).

Style-notes

* Staticmethods everywhere - just make sure staticmethods make sense here

* Remove pyc from source tree * multiprocessing + uuid4 may cause issues (dup uuids if not careful)

Wiki: ImageNotes (last edited 2010-08-10 02:08:17 by David Pravec)