Filtering by 'created_at' and 'updated_at' when specify invalid value causes 500 error

Bug #1517809 reported by Darja Shakhray
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Undecided
Darja Shakhray

Bug Description

ENVIRONMENT: devstack, Glance (master, 19.11.2015)

STEPS TO REPRODUCE:
send request
    curl -H "X-Auth-Token: token" -X GET http://localhost:9292/v2/images?updated_at=lt:100 -i
or
    curl -H "X-Auth-Token: token" -X GET http://localhost:9292/v2/images?created_at=lt:100 -i

EXPECTED RESULT:
status code 400 and message error

ACTUAL RESULT:
<html>
 <head>
  <title>500 Internal Server Error</title>
 </head>
 <body>
  <h1>500 Internal Server Error</h1>
  The server has either erred or is incapable of performing the requested operation.<br /><br />

 </body>
</html

Stacktrace: http://paste.openstack.org/show/479387/

Changed in glance:
status: New → Confirmed
Revision history for this message
Niall Bunting (niall-bunting) wrote :
Changed in glance:
assignee: nobody → Darja Shakhray (dshakhray)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

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

Reviewed: https://review.openstack.org/247454
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=6051146bbe5c86c1a67d40ba9629b7f5b581adaa
Submitter: Jenkins
Branch: master

commit 6051146bbe5c86c1a67d40ba9629b7f5b581adaa
Author: Darja Shakhray <email address hidden>
Date: Thu Nov 19 14:54:03 2015 +0300

    Fix 500 error when filtering by 'created_at' and 'updated_at'

    Added catch 'ValueError' exception when value is converted
    to ISO 8601 DateTime format.

    Change-Id: I833529b124a275e3ab33e23494d0bfd9ab198b49
    Closes-bug: #1517809

Changed in glance:
status: In Progress → Fix Committed
Changed in glance:
status: Fix Committed → 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.