500 error when trying to create 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 ...
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.
When I do glance image-list I get the same error.
glance-api.conf is here: http://pastebin.com/a9KFNeQc (link)
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)
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?