Image state is showing "SAVING" indefinately though image uploading fails

Bug #977208 reported by Sailaja Pashumarthy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Incomplete
Undecided
Unassigned

Bug Description

Image state is showing "SAVING" indefinitely though image uploading is fails but state should be ERROR instead of SAVING

Steps to reproduce :

glance add name="test" is_public=true < / image

Expected Result :

Status of the image should be ERROR state

Actual Result :

Image state is in SAVING state

summary: - Image state is showing "SAVING" indefinately though image uploading is
+ Image state is showing "SAVING" indefinately though image uploading
fails
Revision history for this message
Brian Waldon (bcwaldon) wrote :

The command you attempted to run results in 'Python error: <stdin> is a directory, cannot continue' for me. Can you provide the exact command you used to produce this behavior?

Changed in nova:
status: New → Incomplete
affects: nova → glance
Revision history for this message
Sailaja Pashumarthy (sailaja-pashumarthy) wrote :

Command to reproduce the bug :

glance add name="test" is_public=true < /absolute path of image to be added to glance

Revision history for this message
Jay Pipes (jaypipes) wrote :

Sailaja, a few questions:

1) What version of Glance are you using?
2) Do you see any progress bar output when you issue the command?
3) How big is the image you are trying to upload?
4) Please pastebin the glance-api log segment that is produced when you run the command

Thanks!
-jay

Revision history for this message
Sailaja Pashumarthy (sailaja-pashumarthy) wrote :

Jay,

1. Glance Version is Essex .

2. The following is the command to upload image to Glance,

      root@OpenstackEssex10:~# glance -A 93aa6ecbcaaa4e178a927035160281bf add name="amitest-image" is_public=true < /root/openstackessex/ubuntuimg/ami-tty/image
==================================================================================================================================================[100%] 13.6M/s, ETA 0h 0m 0s

3. The image is of Size 25MB.

4. The above command results in an error,

     Failed to add image. Got error:
Data supplied was not valid.
Details: 400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 Failed to activate image. Got error: Data supplied was not valid. Details: 400 Bad Request The server could not comply with the request since it is either malformed or otherwise incorrect. Failed to update image metadata. Got error: Data supplied was not valid. Details: Invalid disk format 'None' for image.
Note: Your image metadata may still be in the registry, but the image's status will likely be 'killed'.

5. But When I retrieve the list of images with the command 'nova image-list' , the status of the image is 'SAVING'.

6. Later on, I tried to Update the image with container_format and disk_format variables.The result message indicates image
     is Updated,but in the list of images the status is SAVING.It never comes to ACTIVE state.

7. In Glance-registry log , a Rollback of the db transaction to change the status to ACTIVE is done.As a result the status of
     the image SAVING.

8. When any command fails to update the image metadata ,instead of simply performing a Rollback ,can the image state be
     changed to ERROR or KILLED.

Revision history for this message
Brian Waldon (bcwaldon) wrote :

This has to deal with the ordering of attribute validation. We end up uploading the image data to the backend store without validating that the image has an acceptable disk_format/container_format. When this happens, you need to manually update the status to active.

Marking as duplicate of https://bugs.launchpad.net/glance/+bug/981319

Revision history for this message
lbz (lbzistc) wrote :

hello,Jay,

With your advice '4) Please pastebin the glance-api log segment that is produced when you run the command',I checked the log ,and solved my problem!thx

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.