No response is received while changing image's status

Bug #1482101 reported by Sourabh Jaiswal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Invalid
Undecided
Unassigned
openstack-api-site
Fix Released
Low
Diane Fleming

Bug Description

While changing the status of any image in glance no status code or response is returned.

Steps to reproduce:-

1. Get a token using curl request using admin's credentials.
2. Deactivate any image using curl POST request.
3. Check the status of same image using curl request.
4. Reactivate the same image using curl POST request.
5. Check the status of same image using curl request.

Observations:-
1. On Both status change Glance api doesn't returns any status code or status message showing success or failure of the action.
2. But while checking the status of the image using curl request it shows the successful change in the status.

Requirement:-

1. This needs to be fixed as it is not possible for any user to make sure that the action has been successful or not.
2. For automation purpose it is not possible to automate any case based on status change of the image if no status is returned.

Tags: glance
Revision history for this message
Niall Bunting (niall-bunting) wrote :

It does get a reply, its just a 204 (No content). If you wish to confirm this is the case you can use the -v option when using curl to see the response.

Revision history for this message
Sourabh Jaiswal (sourabh-jaiswal) wrote :

As per the API document of openstack it should give a 200 response.
Please find the link of the document:- http://developer.openstack.org/api-ref-image-v2.html

Please confirm if my understanding is right.

Revision history for this message
Ian Cordasco (icordasc) wrote :

I would argue that the API documentation is wrong, not the implemenation. A 204 here makes perfect sense.

Changed in openstack-api-site:
status: New → Confirmed
Changed in glance:
status: New → Invalid
Revision history for this message
Ian Cordasco (icordasc) wrote :

Also, please provide curl commands for reproduction for the api-site team.

Revision history for this message
Sourabh Jaiswal (sourabh-jaiswal) wrote :

Please find the curl command I used for the same.

curl -s -X POST http://10.201.3.204:9292/v2/images/eb416d35-0b13-41a6-a3d6-459009514115/actions/deactivate \
-H \
"X-Auth-Token:7067cc850e2b49aba5e65365ecf52ec0" \
| python -m json.tool

The same command just didn't gave any response.

However adding -v {verbose} mode gives

204 no content.

for which api doc says it should give 200 ok response.

Changed in openstack-api-site:
assignee: nobody → Diane Fleming (diane-fleming)
importance: Undecided → Low
milestone: none → liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to api-site (master)

Fix proposed to branch: master
Review: https://review.openstack.org/215793

Changed in openstack-api-site:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to api-site (master)

Reviewed: https://review.openstack.org/215793
Committed: https://git.openstack.org/cgit/openstack/api-site/commit/?id=2ed6a71c5fe526b7a0a5e718e8cd636e5d2cb424
Submitter: Jenkins
Branch: master

commit 2ed6a71c5fe526b7a0a5e718e8cd636e5d2cb424
Author: Diane Fleming <email address hidden>
Date: Fri Aug 21 16:43:32 2015 -0500

    Update response code to 204 for reactivate and deactivate image

    Also, made a few small edits

    Change-Id: I34105fbcf3ceee994751f6bc4b9b4b19d742ff5d
    Closes-Bug: #1482101

Changed in openstack-api-site:
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.