Bug 1041823 - [RFE][glance]: Add "task" to track the lifecycle of image actions
Summary: [RFE][glance]: Add "task" to track the lifecycle of image actions
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: RHOS Maint
QA Contact:
URL: https://blueprints.launchpad.net/glan...
Whiteboard: upstream_milestone_none upstream_stat...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-12 19:30 UTC by RHOS Integration
Modified: 2015-03-19 17:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-19 17:32:52 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description RHOS Integration 2013-12-12 19:30:08 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/glance/+spec/task-of-image-action.

Description:

By current implement, Glance will "kill" the image if there is a upload failure. And end user can't see the image anymore if the image state is marked "killed". So instead of "killing" an image when something goes wrong during data upload, we need a better way to let end user query the image failed to upload and notify the user. More info, please refer this link: https://blueprints.launchpad.net/glance/+spec/image-error-state-management

Based on the discussion with markwash, we prefer to add "task" instead of a new "error" state to track the life cycle of image actions. And one of the reasons is "error" state means the image is in an "unrecoverable" state.  But in real, the image create action should be able continue by retry/re-upload.

So a typical work flow maybe like below:
1. User submit a command that processes asynchronously to Glance, in the return response there should be /v2/tasks/<id>.
2. User can do GET /v2/tasks/<id> to track the status of this action, including find out any errors
3. The task will be persist. 
     3.1 If the action is executed successfully.
     3.2 If the action failed, the error log will be saved, including the error details. 

For now, Nova is using "action" and "fault" to resolve this kind of issue, so it can be referenced for this design.

Specification URL (additional information):

None


Note You need to log in before you can comment on or make changes to this bug.