commit d6999fbe8c545292a98c4e3d20f3b80e3e66d901
Author: Sean Dague <email address hidden>
Date: Thu Feb 28 14:58:42 2013 -0500
don't stack trace if long ints are passed to db
If we pass a integer, which is longer than the id field in the
database, but a valid python integer into any of the REST API
calls SQLalchemy throws a DataError, and the user sees a 500
instead of InstanceNotFound. This can be triggered by using a
id of 9223372036854775808 (for instance).
This issue is seen on postgresql, mysql and sqlite don't hit it.
Instead, catch the DataError exception, and return an InvalidID
exception. If InvalidID is thrown catch that at the API layer
and return the expected not found.
This was caught when reenabling tempest tests for bug #1046870
and is one of serveral patches in nova needed to enable
test_servers_negative.py in tempest.
Reviewed: https:/ /review. openstack. org/23199 github. com/openstack/ nova/commit/ d6999fbe8c54529 2a98c4e3d20f3b8 0e3e66d901
Committed: http://
Submitter: Jenkins
Branch: master
commit d6999fbe8c54529 2a98c4e3d20f3b8 0e3e66d901
Author: Sean Dague <email address hidden>
Date: Thu Feb 28 14:58:42 2013 -0500
don't stack trace if long ints are passed to db
If we pass a integer, which is longer than the id field in the
database, but a valid python integer into any of the REST API
calls SQLalchemy throws a DataError, and the user sees a 500
instead of InstanceNotFound. This can be triggered by using a
id of 9223372036854775808 (for instance).
This issue is seen on postgresql, mysql and sqlite don't hit it.
Instead, catch the DataError exception, and return an InvalidID
exception. If InvalidID is thrown catch that at the API layer
and return the expected not found.
This was caught when reenabling tempest tests for bug #1046870 servers_ negative. py in tempest.
and is one of serveral patches in nova needed to enable
test_
Change-Id: I6130863a95567e abd3ae05a09e4a9 f26bb5f5098