Comment 10 for bug 1046870

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/23199
Committed: http://github.com/openstack/nova/commit/d6999fbe8c545292a98c4e3d20f3b80e3e66d901
Submitter: Jenkins
Branch: master

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.

    Change-Id: I6130863a95567eabd3ae05a09e4a9f26bb5f5098