500 on listing zones/recordsets with limit=MAX

Bug #1494799 reported by Paul Glass
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
High
Federico Ceratto

Bug Description

Listing zones/recordsets allows using limit=max per http://docs.openstack.org/developer/designate/rest/v2/collections.html#pagination-and-sorting.

Problem:
If any of the letters in "max" are uppercased, Designate will 500.

To reproduce, make any of the following calls:
GET /v2/zones?limit=MAX
GET /v2/zones?limit=Max
GET /v2/zones?limit=maX
...
GET /v2/zones/284954be-d1c1-4f4e-9609-675e87705e32/recordsets?limit=MAX
GET /v2/zones/284954be-d1c1-4f4e-9609-675e87705e32/recordsets?limit=mAx
GET /v2/zones/284954be-d1c1-4f4e-9609-675e87705e32/recordsets?limit=mAX
...

All of the above requests will return a 500 response with the body,
{
  "code": 500,
  "type": "unknown",
  "request_id": "req-5ececba3-4102-450e-80fd-d5f8e73148a1"
}

Tim Simmons (timsim)
Changed in designate:
milestone: none → liberty-rc1
importance: Undecided → High
status: New → Triaged
sonu (sonu-bhumca11)
Changed in designate:
assignee: nobody → sonu (sonu-bhumca11)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

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

Changed in designate:
assignee: sonu (sonu-bhumca11) → Federico Ceratto (federico-ceratto)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/226248
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=8277e964db038399e1d1e2df6e6a92a4e1c4cbbe
Submitter: Jenkins
Branch: master

commit 8277e964db038399e1d1e2df6e6a92a4e1c4cbbe
Author: Federico Ceratto <email address hidden>
Date: Tue Sep 22 11:56:45 2015 +0100

    Fix #1494799 handle limit=max on v2 and Admin APIs

    Handle mixed case "max", raise ValueError on unexpected strings
    on v2 and Admin APIs.
    Add unit tests.

    Change-Id: I2cf8d11bd2f4bc4bdff9d67812f6eb7437eb59ae
    Closes-bug: 1494799

Changed in designate:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in designate:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/227439

Thierry Carrez (ttx)
Changed in designate:
milestone: liberty-rc1 → 1.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/kilo)

Reviewed: https://review.openstack.org/227439
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=9d00e50e9de437e2b696c40d4590de7c33c064c4
Submitter: Jenkins
Branch: stable/kilo

commit 9d00e50e9de437e2b696c40d4590de7c33c064c4
Author: Federico Ceratto <email address hidden>
Date: Tue Sep 22 11:56:45 2015 +0100

    Fix #1494799 handle limit=max on v2 and Admin APIs

    Handle mixed case "max", raise ValueError on unexpected strings
    on v2 and Admin APIs.
    Add unit tests.

    Change-Id: I2cf8d11bd2f4bc4bdff9d67812f6eb7437eb59ae
    Closes-bug: 1494799

tags: added: in-stable-kilo
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.