Jump to: navigation, search

Glance-tasks-api-product

Revision as of 17:14, 30 July 2013 by Brian-rosmaita (talk | contribs) (Tasks API FAQ)

This is a "product package" [1] for:

  • Glance blueprints
    • "New Upload Workflow ("Import")" [2]
    • "New Download Workflow ("Export")" [3]
    • "Model for cloning image from one region to another" [4]
  • Full specifications
    • "Glance Tasks API" [5]
    • "Import Task" [6]
    • "Export Task" [7]
    • "Clone Task" [8]

Press Release

OpenStack Announces Images Tasks API

Available now with the Havana OpenStack release, the Images v2 Tasks API provides cloud users with a unified interface for performing image-related tasks. Three tasks are currently available: import, export, and clone. You simply make a post to /v2/tasks with specifics about the task in the request body, and receive a Location header with the URI of a task resource. By polling the task resource, you'll be kept informed about the status of your task until it reaches its conclusion. At that point, the task resource will contain information concerning the product of your task (e.g., the UUID of the image that was imported). It will also have an expiration timestamp to indicate when the task resource itself will be deleted. (We don't want these things clogging up your tasks list!)

Create some tasks in a Glance located near you today!

The Import Task

The import task allows you to specify the location of the image you want to import into the cloud. You make the request, Glance will retrieve the image, and pull it into the cloud, where you can use it to boot instances. As part of this process, your image may undergo some transformation and validation before it becomes an active image.

The Export Task

The export task enables you to export an image you've created in some provider's cloud in the quasi-official qcow2 format.

The Clone Task

The clone task allows you to copy an image from region to region within a cloud.

Tasks API FAQ

General FAQ

What are Tasks?

A glance task is a request to perform an asynchronous image-related operation. The request results in the creation of a task resource that can be polled for information about the status of the operation.

What happens when a task expires?

The task resource itself will be deleted. The result of the task, e.g., an imported image, will still exist.

Can I cancel a task?

Not sure about this yet. It may depend upon the status of the task.

Can I use my images while they are being processed by a task?

Probably as long as you don't do something like delete an image you are trying to clone or export.

How can I tell if an image is currently being used by a task?

Not sure, may have to introduce an image task_state similar to what Nova has for instances.

Import Task FAQ

Why do I need to import an image?

Different clouds use different underlying technologies. Importing an image allows your cloud provider to process the image to make it suitable for booting in their cloud.

How do I import an image?

First, you put the image into a cloud storage account in an OpenStack cloud. Next, you issue a POST to /v2/tasks with an import task request content. Glance will fetch the image from your cloud storage, do whatever processing the cloud provider deems necessary to prepare your image for booting in their cloud, and create a new image for you.

What are the supported formats?

The standard OpenStack image interchange format is qcow2. Your cloud provider may allow imports from other formats.

Can I just send glance the image bits directly?

No. (We don't want to tie up the glance nodes with slow uploads. Instead, the workflow is to get users to upload to cloud storage, which is specifically designed to handle large uploads of data from connections of varying bandwidth.)

Export Task FAQ

Clone Task FAQ

References

  1. See an explanation of "product package" at https://wiki.openstack.org/wiki/Glance-property-protections-product#WTF.3F
  2. https://blueprints.launchpad.net/glance/+spec/new-upload-workflow
  3. https://blueprints.launchpad.net/glance/+spec/new-download-workflow
  4. https://blueprints.launchpad.net/glance/+spec/clone-image-across-regions
  5. https://wiki.openstack.org/wiki/Glance-tasks-api
  6. https://wiki.openstack.org/wiki/Glance-tasks-import
  7. https://wiki.openstack.org/wiki/Glance-tasks-export
  8. https://wiki.openstack.org/wiki/Glance-tasks-clone