non "queued" images is updatable with "--file" option.

Bug #1240462 reported by anju Tiwari
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Low
anju Tiwari

Bug Description

As Image update should be allowable for "queued" images only. This behaviour works fine with "--location/copy from" option. But if we update the non "queued" image with "--file" option, it does not through any error. Non "queued" images should not be updatable with any option.

Changed in python-glanceclient:
assignee: nobody → anju Tiwari (anjutiwari5)
Revision history for this message
anju Tiwari (anjutiwari5) wrote :

Currently this only checking "the file exists or not" only for queued images. It should also checked for images in Which are in Active state.

Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
Alex Meade (alex-meade) wrote :

Someone should correct me if I am wrong, but I do not think the API allows for setting data on an image in ACTIVE state

Changed in python-glanceclient:
status: In Progress → Invalid
Revision history for this message
anju Tiwari (anjutiwari5) wrote :

hii Alex , I Think its valid for location, copy-from . If the Api does not allow this then , how the Image is updating an Active Image. If it valid from Api side then it should raise message like this :

Attempted to update File field for an image not in queued status.
    (HTTP 400)

https://bugs.launchpad.net/python-glanceclient/+bug/1220809

And you can check this also. https://github.com/openstack/glance/blob/master/glance/api/v1/images.py#L793 .

summary: - Updating an Image with not existing file
+ Updating an Active Image with not existing file
Revision history for this message
Alex Meade (alex-meade) wrote : Re: Updating an Active Image with not existing file

I'm not sure I completely understand. Sorry!

I think currently if you specify --file but the image is not in 'queued' status then glanceclient will ignore --file completely. Are you suggesting that glanceclient should not perform this check and it should be up to the API to return an HTTP 400?

 I agree that the client should not contain such logic.

summary: - Updating an Active Image with not existing file
+ Updating an Active Image with non existing file
Revision history for this message
anju Tiwari (anjutiwari5) wrote : Re: Updating an Active Image with non existing file

Yes Alex,
Check should be in API side not in glanceclient.

So here, API should have the logic to check the correct image status for "--file" option also as it does for "--location/--copy from" option.

Revision history for this message
anju Tiwari (anjutiwari5) wrote :

Correcting the Bug description.

description: updated
summary: - Updating an Active Image with non existing file
+ non "queued" images is updatable with "--file" option.
Revision history for this message
Alex Meade (alex-meade) wrote :

Thanks for helping me understand the issue. Sounds good to me

Changed in python-glanceclient:
status: Invalid → In Progress
importance: Undecided → Low
Revision history for this message
Ian Cordasco (icordasc) wrote :

I'm very confident this has been both fixed and released.

Changed in python-glanceclient:
status: In Progress → Fix Released
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.