Ask Your Question
0

500 error when trying to create image

asked 2014-05-08 10:32:35 -0500

weevil gravatar image

I am following the tutorial to create the Openstack deployment. I am as far as creating the Cirros test image. When using the command:

glance image-create --name "cirros-0.3.2-x86_64" --disk-format qcow2 --container-format bare --is-public True --progress < cirros-0.3.2-x86_64-disk.img

I get the following error:

Request returned failure status.
HTTPInternalServerError (HTTP 500)

Here is the log tail:

controller:/tmp/images # vim /var/log/glance/api.log
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/site-packages/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/site-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/site-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/site-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/utils.py", line 436, in wrapped
    return func(self, req, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 791, in create
    image_meta = self._reserve(req, image_meta)
  File "/usr/lib/python2.7/site-packages/glance/api/v1/images.py", line 524, in _reserve
    image_meta = registry.add_image_metadata(req.context, image_meta)
  File "/usr/lib/python2.7/site-packages/glance/registry/client/v1/api.py", line 161, in add_image_metadata
    return c.add_image(image_meta)
  File "/usr/lib/python2.7/site-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/site-packages/glance/registry/client/v1/client.py", line 107, in do_request
    **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 69, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 386, in do_request
    headers=copy.deepcopy(headers))
  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 83, in wrapped
    return func(self, method, url, body, headers)
  File "/usr/lib/python2.7/site-packages/glance/common/client.py", line 527, in _do_request
    raise exception.NotAuthenticated(res.read())
NotAuthenticated: Authentication required
2014-05-08 16:29:02.727 2875 INFO glance.wsgi.server [27b6562b-5cb5-4d80-ae46-620b2aa58374 0a003bee08a548ddb6bfb2f0871a7ca9 259a71bdc7864f34b2aac82ebea5f653 - - -] 192.168.80.140 - - [08/May/2014 16:29:02] "POST /v1/images HTTP/1.1" 500 139 0.335661

I can see the Authentication Required message, but I have successfully stored the admin credentials, I can check by using the keystone token-get function.

I have also checked that the ports are open and listening on 9191 and 9292:

controller:/tmp/images # netstat -aon | grep :9191
tcp        0      0 0 ...
(more)
edit retag flag offensive close merge delete

Comments

Are you getting back results from glance image-list? You may want to post the glance api conf, it could be an issue with glance authenticating with keystone, which would be under the keyston section in the api/registry.

mpetason gravatar imagempetason ( 2014-05-08 11:08:52 -0500 )edit

When I do glance image-list I get the same error.

glance-api.conf is here: http://pastebin.com/a9KFNeQc (link)

weevil gravatar imageweevil ( 2014-05-08 11:27:54 -0500 )edit

What are you using for your openrc file? Are you still using the admin token or did you change over to the admin user on the admin tenant? What exports are you using? You may want update the openrc, logout of the user, log back in, source the openrc then try it again. (easier than manual removal)

mpetason gravatar imagempetason ( 2014-05-08 11:34:34 -0500 )edit

I am using the admin user on the admin tenant. When i use source admin-rc.sh I can use the keystone token-get command to spit out the token ID etc. So I think that's working. How do I update the openrc?

weevil gravatar imageweevil ( 2014-05-09 02:41:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-05-08 15:05:50 -0500

dro gravatar image

check your keystone logs, this looks like a password configuration issue. What is the output of the keystone logs. I think you will find the error there.

edit flag offensive delete link more

Comments

Keystone logs are here: http://pastebin.com/E4ghDrw8

Authentication issues, as we thought, also something about cannot find admin or demo projects??

weevil gravatar imageweevil ( 2014-05-09 02:44:59 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-05-08 10:32:35 -0500

Seen: 930 times

Last updated: May 08 '14