cinder create failed with HTTP 500

asked 2013-04-26 10:58:52 -0600

khoivu gravatar image

updated 2013-04-26 11:02:11 -0600

I installed cinder using this (document). However, when I tried to run the command "cinder create" or "cinder list", I got a HTTP code 500. The below are commands I executed to test my cinder installation:

# create a 2GB test loopfile /etc/cinder/cinder-volumes
dd if=/dev/zero of=cinder-volumes bs=1 count=0 seek=2G
# mount it
losetup /dev/loop2 cinder-volumes
# intialize it as an lvm 'physical volume' then create lvm 'volume group'
pvcreate /dev/loop2
vgcreate cinder-volumes /dev/loop2
# display the lvm
vgdisplay cinder-volumes
--- Volume group ---
 VG Name               cinder-volumes
System ID
Format                lvm2
Metadata Areas        1
# restart cinder services
service openstack-cinder-api restart
service openstack-cinder-scheduler restart
service openstack-cinder-volume restart
# create a 1GB test volumes
cinder --debug create --display_name test 1
# cinder list has same error

The error from the --debug is below:

DEBUG (shell:473) The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-79f4c61f-4ff2-4f72-8e61-82626ba42f2f

Traceback (most recent call last):

File "/usr/lib/python2.6/site-packages/cinderclient/", line 470, in main OpenStackCinderShell().main(sys.argv[1:])

File "/usr/lib/python2.6/site-packages/cinderclient/", line 421, in main args.func(self.cs, args)

File "/usr/lib/python2.6/site-packages/cinderclient/v1/", line 231, in docreate metadata=volumemetadata)

File "/usr/lib/python2.6/site-packages/cinderclient/v1/", line 138, in create return self._create('/volumes', body, 'volume')

File "/usr/lib/python2.6/site-packages/cinderclient/", line 149, in _create resp, body =, body=body)

File "/usr/lib/python2.6/site-packages/cinderclient/", line 141, in post return self.csrequest(url, 'POST', **kwargs)

File "/usr/lib/python2.6/site-packages/cinderclient/", line 126, in csrequest **kwargs)

File "/usr/lib/python2.6/site-packages/cinderclient/", line 109, in request raise exceptions.from_response(resp, body)

ClientException: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-79f4c61f-4ff2-4f72-8e61-82626ba42f2f)

ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-79f4c61f-4ff2-4f72-8e61-82626ba42f2f) connect: (, 5000) ****

send: 'POST /v2.0/tokens HTTP/1.1\r\nHost:\r\nContentLength: 114\r\ncontent-type: application/json\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nuser-agent: python-cinderclient\r\n\r\n' send: '{"auth": {"tenantName": "openstackDemo", "passwordCredentials": {"username": "admin", "password": "changeit123"}}}'

reply: 'HTTP/1.1 200 OK\r\n'

header: Vary: X-Auth-Token

header: Content-Type: application/json

header: Content-Length: 2161

header: Date: Thu, 25 Apr 2013 16:11:12 GMT

connect: (, 8776) ****

send: u'POST /v1/93d99faec60246899e1f4ae20b00c504/volumes HTTP/1.1\r\nHost:\r\nContent-Length: 267\r\nx-auth-project-id: openstackDemo\r\naccept-encoding: gzip, deflate\r\naccept: application/json\r\nx-auth-token: f6c6829a8db94e5eaa2aee1c265c255a\r\nuser-agent: python-cinderclient\r\ncontent-type: application/json\r\n\r\n' send: '{"volume": {"status": "creating", "availabilityzone": null, "displaydescription": null, "snapshotid": null, "userid": null, "size": 1 ... (more)

edit retag flag offensive close merge delete


I found this error in /var/log/cinder/api.log

>Caught error: 'RequestContext' object has no attribute 'service_catalog'

khoivu gravatar imagekhoivu ( 2013-04-26 12:47:41 -0600 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-05-08 15:48:40 -0600

khoivu gravatar image

I decided to step up to new release grizzly, hopefully that grizzly fixes the issues I am having. I followed from RDO (Redhat distribution of Openstack - I have finally successfully installed and run grizzly.

edit flag offensive delete link more

answered 2013-04-28 22:51:19 -0600

jgriffith gravatar image

Can you take a look at /var/log/cinder.api.log and perhaps /var/log/cinder.volume.log and see if we can pin point where the request is failing?

edit flag offensive delete link more


There is no ERROR in /var/log/cinder/volume.log but there is error in /var/log/cinder/api.log

2013-04-25 12:10:02 11388 TRACE cinder.api.openstack 'access': {'serviceCatalog': context.service_catalog or {}} 2013-04-25 12:10:02 11388 TRACE cinder.api.openstack AttributeError: 'RequestContext'

khoivu gravatar imagekhoivu ( 2013-04-29 09:33:53 -0600 )edit

This is the only error in /var/log/cinder/api.log

2013-04-25 12:10:40 ERROR cinder.api.openstack [req-945a9d35-b0ba-4bdf-bbc5-f00783047598 82e5f815c6d64a47916be10aae890926 93d99faec60246899e1f4ae20b00c504] Caught error: 'RequestContext' object has no attribute 'service_catalog'

khoivu gravatar imagekhoivu ( 2013-04-29 09:41:28 -0600 )edit

Ok, so it appears that your keystone configuration is not correct. You're making it to the API but there's no service-catalog info to route the request from there. Might want to try 'keystone-service list' and then 'keystone-endpoint list' and look for the "Cinder Volume Service".

jgriffith gravatar imagejgriffith ( 2013-04-29 10:11:38 -0600 )edit

I created correct cinder service and endpoints with keystone. I cannot paste the output here because the output of those command is longer than allowed to paste here. Do you know what file on the server that I should look?

khoivu gravatar imagekhoivu ( 2013-04-30 10:33:08 -0600 )edit

cinder service received the request. Based on the debug log, I was able to trace to cinder/api/v1/

newvolume = self.volumeapi.create(context, size, volume.get('displayname'), volume.get('displaydescription'),**kwargs)

khoivu gravatar imagekhoivu ( 2013-05-01 09:13:01 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools


Asked: 2013-04-26 10:58:52 -0600

Seen: 3,426 times

Last updated: May 08 '13