volume manage api should return 400 for invalid or non-existing volume-type

Bug #1632727 reported by Dinesh Bhor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Dinesh Bhor

Bug Description

If you pass non-existing volume-type to the volume manage API, then it returns 404 HTTPNotFound error.
According to api guidelines [1] it should return 400 HTTPBadRequest.

[1] https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications

Command:

$ cinder manage ubuntu@lvmdriver-1#lvmdriver-1 --volume-type lvmdriver-1111 --id-type=source-id fb3c0b01-e748-4493-afdd-90e4ab33e3d1 --name testing_6

ERROR: Volume type with name lvmdriver-1111 could not be found. (HTTP 404) (Request-ID: req-ef585ce0-fcdf-4d45-92b6-dc4fff22dc44)

Changed in cinder:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
Changed in masakari:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
Changed in cinder:
importance: Undecided → Low
status: New → Confirmed
no longer affects: masakari
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/386410

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

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

commit e435194463da1b08f18de90cc4be3091114390c3
Author: dineshbhor <email address hidden>
Date: Wed Oct 12 16:50:37 2016 +0530

    Return HTTPBadRequest instead of HTTPNotFound

    If you pass non-existing volume-type or service to the volume manage
    API, then it returns 404 HTTPNotFound error.

    According to the api guidelines [1] it should return 400
    HTTPBadRequest.

    [1] https://github.com/openstack/api-wg/blob/master/guidelines/http.rst#failure-code-clarifications

    APIImpact: For volume manage API, it will return 400 error instead
    of 404 if user passes non-existing volume-type or service in the
    request.

    Closes-Bug: #1632727
    Change-Id: Iffa1824454c765d8cb732e93503420bafca17f08

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 10.0.0.0b1

This issue was fixed in the openstack/cinder 10.0.0.0b1 development milestone.

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.