Cinder consistencygroup delete api returns 500

Bug #1458868 reported by Pranali Deore
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Pranali Deore

Bug Description

If invalid request body is passed to below curl command(consistencygroup delete api), cinder service returns 500 'Internal Server' Error,

curl -g -i -X POST http://10.69.4.136:8776/v2/1f1e61770393455c86704b449b2ee7cc/consistencygroups/f9bb1d1d-a3e6-4415-af7f-9260bf195e21/delete -H "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 01c68b7138cf40d1b345138ba45a7298" -d '{"consistencysdfdfgroup": {"force": false}}'

Error logs of c-api:

2015-05-26 05:51:35.487 ERROR cinder.api.middleware.fault [req-b270f343-8f31-4a0f-a489-b091225a467a 6d934bb450034d3d874908dee0f36dc7 1f1e61770393455c86704b449b2ee7cc] Caught error: 'consistencygroup'
2015-05-26 05:51:35.487 INFO cinder.api.middleware.fault [req-b270f343-8f31-4a0f-a489-b091225a467a 6d934bb450034d3d874908dee0f36dc7 1f1e61770393455c86704b449b2ee7cc] http://10.69.4.136:8776/v2/1f1e61770393455c86704b449b2ee7cc/consistencygroups/f9bb1d1d-a3e6-4415-af7f-9260bf195e21/delete returned with HTTP 500
2015-05-26 05:51:35.488 INFO eventlet.wsgi.server [req-b270f343-8f31-4a0f-a489-b091225a467a 6d934bb450034d3d874908dee0f36dc7 1f1e61770393455c86704b449b2ee7cc] 10.69.4.136 - - [26/May/2015 05:51:35] "POST /v2/1f1e61770393455c86704b449b2ee7cc/consistencygroups/f9bb1d1d-a3e6-4415-af7f-9260bf195e21/delete HTTP/1.1" 500 401 0.230551

Changed in cinder:
assignee: nobody → Pranali Deore (pranali-deore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
status: New → In Progress
Changed in cinder:
assignee: Pranali Deore (pranali-deore) → Huang Zhiteng (zhiteng-huang)
Changed in cinder:
assignee: Huang Zhiteng (zhiteng-huang) → Pranali Deore (pranali-deore)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/186669
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=299b99437c2de84222fd585f06c2d05ca213225b
Submitter: Jenkins
Branch: master

commit 299b99437c2de84222fd585f06c2d05ca213225b
Author: PranaliDeore <email address hidden>
Date: Mon May 25 02:14:26 2015 -0700

    ConsistencyGroup: Return 400 instead of 500 for invalid body

    If invalid request body is passed to the delete
    consistencygroups api, then it returns 500 error.

    Validated request body using 'is_valid_body()' method
    and also added validation to check 'force' is of bool type.

    APIImpact

    Closes-Bug: #1458868
    Change-Id: Iaaa4409233bfed6ae3e67be5df8cc5ada28e054f

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-1 → 7.0.0
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.