← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1178307] Re: '500' can occur when inaccessible id of other user used as marker

 

** Tags removed: grizzly-backport-potential

** Also affects: glance/grizzly
   Importance: Undecided
       Status: New

** No longer affects: glance/grizzly

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

Title:
  '500' can occur when inaccessible id of other user used as marker

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

Bug description:
  
  An image is owned by an admin user:

  glance  --os-username glance --os-password XXX --os-tenant-name service --os-auth-url http://localhost:5000/v2.0 image-show  15553526-082c-44a9-80d9-4d1fab83fd2d
  +------------------+--------------------------------------+
  | Property         | Value                                |
  +------------------+--------------------------------------+
  | checksum         | 3e2a7777fb3c370e7affc625ac0ace05     |
  | container_format | bare                                 |
  | created_at       | 2013-05-08T12:40:43                  |
  | deleted          | False                                |
  | disk_format      | raw                                  |
  | id               | 15553526-082c-44a9-80d9-4d1fab83fd2d |
  | is_public        | False                                |
  | min_disk         | 0                                    |
  | min_ram          | 0                                    |
  | name             | admin-priv                           |
  | owner            | ad9ddbf47b564e65b9e258624fde699c     |
  | protected        | False                                |
  | size             | 667                                  |
  | status           | active                               |
  | updated_at       | 2013-05-08T12:40:43                  |
  +------------------+--------------------------------------+

  Another user attempts to use that id as a marker:

  curl -v  -H "x-auth-token: `cat ~/demo.token`"
  'http://localhost:9292/v1/images/detail?marker=15553526-082c-
  44a9-80d9-4d1fab83fd2d'

  
  < HTTP/1.1 500 Internal Server Error
  < Content-Type: text/plain
  < Content-Length: 5014
  < Date: Thu, 09 May 2013 15:42:00 GMT
  < Connection: close
  <
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 383, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
      return self.app(env, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
      return app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 591, in __call__
      request, **action_args)
    File "/opt/stack/glance/glance/common/wsgi.py", line 608, in dispatch
      return method(*args, **kwargs)
    File "/opt/stack/glance/glance/api/v1/images.py", line 204, in detail
      images = registry.get_images_detail(req.context, **params)
    File "/opt/stack/glance/glance/registry/client/v1/api.py", line 148, in get_images_detail
      return c.get_images_detailed(**kwargs)
    File "/opt/stack/glance/glance/registry/client/v1/client.py", line 115, in get_images_detailed
      res = self.do_request("GET", "/images/detail", params=params)
    File "/opt/stack/glance/glance/registry/client/v1/client.py", line 90, in do_request
      **kwargs)
    File "/opt/stack/glance/glance/common/client.py", line 62, in wrapped
      return func(self, *args, **kwargs)
    File "/opt/stack/glance/glance/common/client.py", line 376, in do_request
      headers=headers)
    File "/opt/stack/glance/glance/common/client.py", line 79, in wrapped
      return func(self, method, url, body, headers)
    File "/opt/stack/glance/glance/common/client.py", line 514, in _do_request
      raise exception.ServerError()
  ServerError: The request returned 500 Internal Server Error.
  * Closing connection #0

  
  3344 DEBUG eventlet.wsgi.server [a7ad61ac-7c6b-415d-b88c-eee46d8c28a4 7fd88ea49a01438a9cd5ff9bc62cc9c3 05ec9af64459466881e2dd121245743b] Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 383, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
      return self.app(env, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 367, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
      response = self.app(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/opt/stack/glance/glance/common/wsgi.py", line 591, in __call__
      request, **action_args)
    File "/opt/stack/glance/glance/common/wsgi.py", line 608, in dispatch
      return method(*args, **kwargs)
    File "/opt/stack/glance/glance/registry/api/v1/images.py", line 124, in detail
      images = self._get_images(req.context, **params)
    File "/opt/stack/glance/glance/registry/api/v1/images.py", line 72, in _get_images
      **params)
    File "/opt/stack/glance/glance/db/sqlalchemy/api.py", line 604, in image_get_all
      force_show_deleted=showing_deleted)
    File "/opt/stack/glance/glance/db/sqlalchemy/api.py", line 303, in _image_get
      raise exception.Forbidden("Image not visible to you")
  Forbidden: Image not visible to you

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