← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1302345] [NEW] glance registry v2 doesn't work

 

Public bug reported:

Glance v2 registry API still doesn't work in Icehouse. This time
thankfully the fix is pretty simple

Basically this is because the "configure_registry_client()" method in registry/client/v2/api.py isn't called anywhere in the code.
Adding this call to the get_registry_client method fixes everything.

This is a pretty critical bug so I'm hoping this can be fixed for when
Icehouse is released?


2014-04-04 16:33:25.536 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Matched GET /images __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2014-04-04 16:33:25.537 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.common.wsgi.Resource object at 0x7f76e4d6d390>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2014-04-04 16:33:25.539 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Match dict: {'action': u'index', 'controller': <glance.common.wsgi.Resource object at 0x7f76e4d6d390>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2014-04-04 16:33:25.541 14975 DEBUG glance.common.client [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Constructed URL: http://None:9191/rpc _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2014-04-04 16:33:25.561 14975 INFO glance.wsgi.server [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/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/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v2/images.py", line 91, in index
    member_status=member_status)
  File "/usr/lib/python2.7/dist-packages/glance/api/authorization.py", line 99, in list
    images = self.image_repo.list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
    items = self.base.list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/policy.py", line 183, in list
    return super(ImageRepoProxy, self).list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
    items = self.base.list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
    items = self.base.list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
    items = self.base.list(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/db/__init__.py", line 75, in list
    member_status=member_status)
  File "/usr/lib/python2.7/dist-packages/glance/db/registry/api.py", line 50, in wrapper
    return func(client, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/db/registry/api.py", line 142, in image_get_all
    admin_as_user=admin_as_user)
  File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 273, in method_proxy
    return self.do_request(item, **kw)
  File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 239, in do_request
    'kwargs': kwargs}])
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 225, in bulk_request
    body)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 550, in _do_request
    raise exception.ClientConnectionError(e)
ClientConnectionError: [Errno -2] Name or service not known
2014-04-04 16:33:25.568 14975 INFO glance.wsgi.server [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] 128.250.116.173 - - [04/Apr/2014 16:33:25] "GET /v2/images?limit=20 HTTP/1.1" 500 139 0.047958

** Affects: glance
     Importance: Undecided
         Status: New

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

Title:
  glance registry v2 doesn't work

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

Bug description:
  Glance v2 registry API still doesn't work in Icehouse. This time
  thankfully the fix is pretty simple

  Basically this is because the "configure_registry_client()" method in registry/client/v2/api.py isn't called anywhere in the code.
  Adding this call to the get_registry_client method fixes everything.

  This is a pretty critical bug so I'm hoping this can be fixed for when
  Icehouse is released?

  
  2014-04-04 16:33:25.536 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Matched GET /images __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
  2014-04-04 16:33:25.537 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Route path: '/images', defaults: {'action': u'index', 'controller': <glance.common.wsgi.Resource object at 0x7f76e4d6d390>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
  2014-04-04 16:33:25.539 14975 DEBUG routes.middleware [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Match dict: {'action': u'index', 'controller': <glance.common.wsgi.Resource object at 0x7f76e4d6d390>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
  2014-04-04 16:33:25.541 14975 DEBUG glance.common.client [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Constructed URL: http://None:9191/rpc _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
  2014-04-04 16:33:25.561 14975 INFO glance.wsgi.server [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
      return self.app(env, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
      return app(environ, start_response)
    File "/usr/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/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
      request, **action_args)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
      return method(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/api/v2/images.py", line 91, in index
      member_status=member_status)
    File "/usr/lib/python2.7/dist-packages/glance/api/authorization.py", line 99, in list
      images = self.image_repo.list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
      items = self.base.list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/api/policy.py", line 183, in list
      return super(ImageRepoProxy, self).list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
      items = self.base.list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
      items = self.base.list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/domain/proxy.py", line 89, in list
      items = self.base.list(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/db/__init__.py", line 75, in list
      member_status=member_status)
    File "/usr/lib/python2.7/dist-packages/glance/db/registry/api.py", line 50, in wrapper
      return func(client, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/db/registry/api.py", line 142, in image_get_all
      admin_as_user=admin_as_user)
    File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 273, in method_proxy
      return self.do_request(item, **kw)
    File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 239, in do_request
      'kwargs': kwargs}])
    File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
      return func(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/rpc.py", line 225, in bulk_request
      body)
    File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 66, in wrapped
      return func(self, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 386, in do_request
      headers=copy.deepcopy(headers))
    File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 83, in wrapped
      return func(self, method, url, body, headers)
    File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 550, in _do_request
      raise exception.ClientConnectionError(e)
  ClientConnectionError: [Errno -2] Name or service not known
  2014-04-04 16:33:25.568 14975 INFO glance.wsgi.server [7b235057-41cb-46a3-b397-fef7b250bb58 c0645ff94b864d3d84c438d9855f9cea 9427903ca1544f0795ba4117d55ed9b2 - - -] 128.250.116.173 - - [04/Apr/2014 16:33:25] "GET /v2/images?limit=20 HTTP/1.1" 500 139 0.047958

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


Follow ups

References