glance image create 报500错误

Jay_Wei 发布于 2015/11/12 11:59
阅读 1K+
收藏 0

在Ubuntu上搭建openstack,部署glance发现在导入Img时出现500错误,详细的debug日志在下面,这个问题怎么解决呢?

~# glance  image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --location http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img

【日志打印】

2015-11-12 16:17:54.342 9782 DEBUG glance.api.middleware.version_negotiation [-] Determining version of request: POST /v1/images Accept:  process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:44
2015-11-12 16:17:54.344 9782 DEBUG glance.api.middleware.version_negotiation [-] Using url versioning process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:57
2015-11-12 16:17:54.345 9782 DEBUG glance.api.middleware.version_negotiation [-] Matched version: v1 process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:69
2015-11-12 16:17:54.345 9782 DEBUG glance.api.middleware.version_negotiation [-] new path /v1/images process_request /usr/lib/python2.7/dist-packages/glance/api/middleware/version_negotiation.py:70
2015-11-12 16:17:54.347 9782 DEBUG glance.api.policy [-] Loading policy from /etc/glance/policy.json _read_policy_file /usr/lib/python2.7/dist-packages/glance/api/policy.py:106
2015-11-12 16:17:54.348 9782 DEBUG glance.api.policy [-] Loaded policy rules: {u'get_task': '@', u'get_image_location': '@', u'add_image': '@', u'modify_image': '@', u'manage_image_cache': 'role:admin', u'delete_member': '@', u'get_images': '@', u'delete_image': '@', u'publicize_image': '@', u'get_member': '@', u'add_member': '@', u'set_image_location': '@', u'get_image': '@', u'modify_member': '@', u'context_is_admin': 'role:admin', u'upload_image': '@', u'modify_task': '@', u'get_members': '@', u'get_tasks': '@', u'add_task': '@', u'default': '@', u'delete_image_location': '@', u'copy_from': '@', u'download_image': '@'} load_rules /usr/lib/python2.7/dist-packages/glance/api/policy.py:85
2015-11-12 16:17:54.350 9782 DEBUG routes.middleware [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Matched POST /images __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:100
2015-11-12 16:17:54.350 9782 DEBUG routes.middleware [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Route path: '/images', defaults: {'action': u'create', 'controller': <glance.common.wsgi.Resource object at 0x7fd2e770d090>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:102
2015-11-12 16:17:54.351 9782 DEBUG routes.middleware [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Match dict: {'action': u'create', 'controller': <glance.common.wsgi.Resource object at 0x7fd2e770d090>} __call__ /usr/lib/python2.7/dist-packages/routes/middleware.py:103
2015-11-12 16:17:54.874 9782 DEBUG glance.registry.client.v1.api [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Adding image metadata... add_image_metadata /usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py:159
2015-11-12 16:17:54.876 9782 DEBUG glance.common.client [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Constructed URL: http://0.0.0.0:9191/images _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-11-12 16:17:54.884 9782 DEBUG glance.common.client [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Constructed URL: http://0.0.0.0:9191/images _construct_url /usr/lib/python2.7/dist-packages/glance/common/client.py:411
2015-11-12 16:17:54.889 9782 INFO glance.registry.client.v1.client [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] Registry client request POST /images raised NotAuthenticated
2015-11-12 16:17:54.891 9782 INFO glance.wsgi.server [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] 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/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/common/utils.py", line 436, in wrapped
    return func(self, req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 790, in create
    image_meta = self._reserve(req, image_meta)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 519, in _reserve
    image_meta = registry.add_image_metadata(req.context, image_meta)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/api.py", line 161, in add_image_metadata
    return c.add_image(image_meta)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 163, in add_image
    res = self.do_request("POST", "/images", body=body, headers=headers)
  File "/usr/lib/python2.7/dist-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/client.py", line 69, 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 527, in _do_request
    raise exception.NotAuthenticated(res.read())
NotAuthenticated: Authentication required
2015-11-12 16:17:54.893 9782 INFO glance.wsgi.server [c86d2d55-b769-4af6-b689-5d9a3db6bf1f - - - - -] 192.168.40.119 - - [12/Nov/2015 16:17:54] "POST /v1/images HTTP/1.1" 500 139 0.552545

加载中
返回顶部
顶部