← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1045179] Re: glance caching fails with webob 1.2.0

 

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

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

Title:
  glance caching fails with webob 1.2.0

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

Bug description:
  get devstack at 2012/09/03. set "flavor=keystone+caching" in glance-api.conf.
  ---
  $ glance -d image-list
  curl -i -X GET -H 'X-Auth-Token: 9523d7980eb045c283cc127922e7cef4' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://172.17.190.3:9292/v1/images/detail?limit=20

  HTTP/1.1 500 Internal Server Error
  date: Mon, 03 Sep 2012 05:25:56 GMT
  content-length: 2234
  content-type: text/plain
  connection: close

  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 382, 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 320, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1295, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1259, in call_application
      app_iter = application(self.environ, start_response)
    File "/opt/stack/keystone/keystone/middleware/auth_token.py", line 278, 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 320, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1295, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1259, 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 321, in __call__
      return self.process_response(response)
    File "/opt/stack/glance/glance/api/middleware/cache.py", line 145, in process_response
      image_id = request.environ['api.cache.image_id']
  AttributeError: 'NoneType' object has no attribute 'environ'

  
  Request returned failure status.
  None
  HTTPInternalServerError (HTTP 500)
  ---

  note that "flavor=keystone" work OK. result should be:
  ---
  $ glance -d image-list
  curl -i -X GET -H 'X-Auth-Token: c1fcc2fa11094db5a4e325254882edf2' -H 'Content-Type: application/json' -H 'User-Agent: python-glanceclient' http://172.17.190.3:9292/v1/images/detail?limit=20

  HTTP/1.1 200 OK
  date: Mon, 03 Sep 2012 05:21:54 GMT
  content-length: 1513
  content-type: application/json; charset=UTF-8

  {"images": [{"status": "active", "name": "cirros-0.3.0-x86_64-uec-
  ramdisk", "deleted": false, "container_format": "ari", "created_at":
  "2012-09-03T05:20:19", "disk_format": "ari", "updated_at":
  "2012-09-03T05:20:19", "properties": {}, "min_disk": 0, "protected":
  false, "id": "e76ee014-2bfc-4b2a-9fcb-751958f560b6", "checksum":
  "2cec138d7dae2aa59038ef8c9aec2390", "owner":
  "ee946e6701e241b58e24c21f2260c6b5", "is_public": true, "deleted_at":
  null, "min_ram": 0, "size": 2254249}, {"status": "active", "name":
  "cirros-0.3.0-x86_64-uec", "deleted": false, "container_format":
  "ami", "created_at": "2012-09-03T05:20:19", "disk_format": "ami",
  "updated_at": "2012-09-03T05:20:20", "properties": {"kernel_id":
  "2651798a-cd03-46c1-8cba-c83cdff7a4a9", "ramdisk_id": "e76ee014-2bfc-
  4b2a-9fcb-751958f560b6"}, "min_disk": 0, "protected": false, "id":
  "910dfb67-5261-46fc-aa41-d2f9067516b2", "checksum":
  "2f81976cae15c16ef0010c51e3a6c163", "owner":
  "ee946e6701e241b58e24c21f2260c6b5", "is_public": true, "deleted_at":
  null, "min_ram": 0, "size": 25165824}, {"status": "active", "name":
  "cirros-0.3.0-x86_64-uec-kernel", "deleted": false,
  "container_format": "aki", "created_at": "2012-09-03T05:20:18",
  "disk_format": "aki", "updated_at": "2012-09-03T05:20:18",
  "properties": {}, "min_disk": 0, "protected": false, "id": "2651798a-
  cd03-46c1-8cba-c83cdff7a4a9", "checksum":
  "cfb203e7267a28e435dbcb05af5910a9", "owner":
  "ee946e6701e241b58e24c21f2260c6b5", "is_public": true, "deleted_at":
  null, "min_ram": 0, "size": 4731440}]}

  +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
  | ID                                   | Name                            | Disk Format | Container Format | Size     | Status |
  +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
  | 2651798a-cd03-46c1-8cba-c83cdff7a4a9 | cirros-0.3.0-x86_64-uec-kernel  | aki         | aki              | 4731440  | active |
  | 910dfb67-5261-46fc-aa41-d2f9067516b2 | cirros-0.3.0-x86_64-uec         | ami         | ami              | 25165824 | active |
  | e76ee014-2bfc-4b2a-9fcb-751958f560b6 | cirros-0.3.0-x86_64-uec-ramdisk | ari         | ari              | 2254249  | active |
  +--------------------------------------+---------------------------------+-------------+------------------+----------+--------+
  ---

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