← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1263684] Re: DB2: GET image with long ID (non-existed) Glance would return 500, but not 404

 

** Changed in: glance
       Status: Fix Committed => Fix Released

** Changed in: glance
    Milestone: None => icehouse-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1263684

Title:
  DB2: GET image with long ID (non-existed) Glance would return 500, but
  not 404

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released

Bug description:
  GET:
  http://9.12.27.148:9292/v1/images/82ff46a0-f49b-4279-bdad-e665c203444477777777777w232323232eer34r3r3r3qer3r3r3r
  would return 500 instead of 400.

  The root cause is as below:
  2013-12-23 07:43:15.387 27806 INFO glance.wsgi.server [687bccf6-ed9e-4efa-988e-a05faafb6c4b 51336fdd98e449ef911f57ad3d03c818 d9f056c22dac4022bf2ebb1ed70fd25e] Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/eventlet/wsgi.py", line 384, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/lib/python2.6/site-packages/keystoneclient/middleware/auth_token.py", line 571, in __call__
      return self.app(env, start_response)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 368, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.6/site-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.6/site-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.6/site-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.6/site-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 620, in __call__
      request, **action_args)
    File "/usr/lib/python2.6/site-packages/glance/common/wsgi.py", line 646, in dispatch
      return method(*args, **kwargs)
    File "/usr/lib/python2.6/site-packages/glance/registry/api/v1/images.py", line 312, in show
      image = self.db_api.image_get(req.context, id)
    File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 315, in image_get
      force_show_deleted=force_show_deleted)
    File "/usr/lib/python2.6/site-packages/glance/db/sqlalchemy/api.py", line 343, in _image_get
      raise e
  DataError: (DataError) ibm_db_dbi::DataError: Statement Execute Failed: [IBM][CLI Driver] CLI0109E  String data right truncation. SQLSTATE=22001 SQLCODE=-99999 'SELECT images.created_at AS images_created_at, images.updated_at AS images_updated_at, images.deleted_at AS images_deleted_at, images.deleted AS images_deleted, images.id AS images_id, images.name AS images_name, images.disk_format AS images_disk_format, images.container_format AS images_container_format, images.size AS images_size, images.status AS images_status, images.is_public AS images_is_public, images.checksum AS images_checksum, images.min_disk AS images_min_disk, images.min_ram AS images_min_ram, images.owner AS images_owner, images.protected AS images_protected, image_properties_1.created_at AS image_properties_1_created_at, image_properties_1.updated_at AS image_properties_1_updated_at, image_properties_1.deleted_at AS image_properties_1_deleted_at, image_properties_1.deleted AS image_properties_1_deleted, image_properties_1.id AS image_properties_1_id, image_properties_1.image_id AS image_properties_1_image_id, image_properties_1.name AS image_properties_1_name, image_properties_1."value" AS image_properties_1_value, image_locations_1.created_at AS image_locations_1_created_at, image_locations_1.updated_at AS image_locations_1_updated_at, image_locations_1.deleted_at AS image_locations_1_deleted_at, image_locations_1.deleted AS image_locations_1_deleted, image_locations_1.id AS image_locations_1_id, image_locations_1.image_id AS image_locations_1_image_id, image_locations_1."value" AS image_locations_1_value, image_locations_1.meta_data AS image_locations_1_meta_data \nFROM images LEFT OUTER JOIN image_properties AS image_properties_1 ON images.id = image_properties_1.image_id LEFT OUTER JOIN image_locations AS image_locations_1 ON images.id = image_locations_1.image_id \nWHERE images.id = ?' ('82ff46a0-f49b-4279-bdad-e665c203444477777777777w232323232eer34r3r3r3qer3r3r3r',)

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1263684/+subscriptions


References