posting poorly structured sample data to a /v2/meters/meter causes 500 instead of 400

Bug #1428185 reported by Chris Dent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Chris Dent
WSME
Fix Released
Undecided
Mehdi Abaakouk

Bug Description

When making a request like the following with poorly structured sample data the response is 500. It should be 400.

    - name: post bad samples to meter
      desc: bad data for samples
      xfail: true
      url: /v2/meters/apples
      method: POST
      request_headers:
          content-type: application/json
      data:
          samples:
              - red
              - blue
              - yellow
      status: 400

Changed in ceilometer:
assignee: nobody → Lena Novokshonova (enovokshonova)
Mehdi Abaakouk (sileht)
Changed in ceilometer:
status: New → Invalid
Changed in wsme:
assignee: nobody → Mehdi Abaakouk (sileht)
Changed in ceilometer:
status: Invalid → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to wsme (master)

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

Changed in wsme:
status: New → In Progress
Changed in ceilometer:
assignee: Lena Novokshonova (enovokshonova) → Mehdi Abaakouk (sileht)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to wsme (master)

Reviewed: https://review.openstack.org/208459
Committed: https://git.openstack.org/cgit/stackforge/wsme/commit/?id=2cb266eadb8a0147328433ea85370cb68cf30e6f
Submitter: Jenkins
Branch: master

commit 2cb266eadb8a0147328433ea85370cb68cf30e6f
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Aug 3 14:30:31 2015 +0200

    Fixes exception path with the datatype is a Object

    If the object type is ArrayType or DictType, the datatype
    is an object not a class. Currently a 500 error is raise
    just because the exception path for invalid input handle only
    when the datatype is an UserType or Class, not object.

    This change fixes that.

    Change-Id: Ifadef698a4dca0d33167bd4d5a567c43fe015108
    Closes-bug: #1428185

Changed in wsme:
status: In Progress → Fix Committed
Changed in wsme:
milestone: none → 0.8.0
status: Fix Committed → Fix Released
Changed in ceilometer:
assignee: Mehdi Abaakouk (sileht) → Chris Dent (chdent)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/208467
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=d7428b7c3873bb47683c4f4d547fce138b79a74b
Submitter: Jenkins
Branch: master

commit d7428b7c3873bb47683c4f4d547fce138b79a74b
Author: Mehdi Abaakouk <email address hidden>
Date: Mon Aug 3 14:41:42 2015 +0200

    Update tests to reflect WSME 0.8 fixes

    All these bugs are now fixed in wsme 0.8.0

    Closes-bug: #1424642
    Closes-bug: #1423634
    Closes-bug: #1419110
    Closes-bug: #1428185
    Closes-bug: #1428628
    Closes-bug: #1428658
    Closes-bug: #1428624

    Change-Id: Iea8507ebc54f42786a44bfcd96246b88dd998bf0

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