← Back to team overview

openstack team mailing list archive

Glance : How to inform user that snapshot has run into "error" ?

 

Hi,

Related to instance being stuck in "image_snapshot" for extended period of time,  it is easy to "recover" the instance  (script uses pre-defined timeout to "guess" that snapshot has hung and will never complete) and bring it back to "usable" state, I also the *inform the user that their snapshot attempt has failed*.

The image goes thru the following statuses during normal case : Queued -> Saving -> Active -> Deleted
If the upload of the image fails checksum verification, status is marked as "killed" (Using _safe_kill() -  a private method)

Neither of "killed" and "deleted" instances are shown to the user either in Dashboard (Horizon) or "nova image-list"

So when "recovering" hung snapshot - what status should be set for the image ? (Such that user knows of the error)

I'm thinking that we need to  either  Introduce a new status like "error"

OR


1.       Modify glance/registry/db/api.py : image_get_all() to return images with "killed" status (currently it is explicitly filtered out)

AND

2.       Expose an API to set the image status to "killed"  (Currently _safe_kill is a private method)

When I tried #1 above locally and set status of one of the images to "killed" directly in DB,  manually then :

1.       nova image-list showed this image status as "ERROR"

2.       Dashboard/Horizon show the status as "Killed"

Please suggest if you can think of better way to handle this.

-Mandar


______________________________________________________________________
Disclaimer:This email and any attachments are sent in strictest confidence for the sole use of the addressee and may contain legally privileged, confidential, and proprietary data.  If you are not the intended recipient, please advise the sender by replying promptly to this email and then delete and destroy this email and any attachments without any further use, copying or forwarding