← Back to team overview

openstack team mailing list archive

Folsom - Cinder error

 

Hi folks, I am trying to setup Cinder in Openstack Folsom on Centos and I am getting the following error when try to list the cinder volumes.
 
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bb6ea248-a337-4857-af3f-8604930aae38)
 
Cinder api log show the following.
 
2013-01-25 14:50:56 INFO cinder.api.openstack.wsgi [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] GET http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail
2013-01-25 14:50:56 DEBUG cinder.api.openstack.wsgi [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] Unrecognized Content-Type provided in request get_body /usr/lib/python2.6/site-packages/cinder/api/openstack/wsgi.py:695
2013-01-25 14:50:56 ERROR cinder.api.openstack [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] Caught error: 'RequestContext' object has no attribute 'service_catalog'
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack Traceback (most recent call last):
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/__init__.py", line 78, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return req.get_response(self.application)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1053, in get_response
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     application, catch_exc_info=False)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/request.py", line 1022, in call_application
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     app_iter = application(self.environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/keystone/middleware/auth_token.py", line 278, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self.app(env, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/Routes-1.12.3-py2.6.egg/routes/middleware.py", line 131, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     response = self.app(environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 159, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 147, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/WebOb-1.0.8-py2.6.egg/webob/dec.py", line 208, in call_func
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self.func(req, *args, **kwargs)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/wsgi.py", line 801, in __call__
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     content_type, body, accept)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/wsgi.py", line 849, in _process_stack
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     action_result = self.dispatch(meth, request, action_args)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/wsgi.py", line 924, in dispatch
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return method(req=request, **action_args)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/volume/volumes.py", line 243, in detail
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self._items(req, entity_maker=_translate_volume_detail_view)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/cinder/api/openstack/volume/volumes.py", line 255, in _items
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     volumes = self.volume_api.get_all(context, search_opts=search_opts)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/nova/volume/cinder.py", line 148, in get_all
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     items = cinderclient(context).volumes.list(detailed=True)
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack   File "/usr/lib/python2.6/site-packages/nova/volume/cinder.py", line 56, in cinderclient
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     'access': {'serviceCatalog': context.service_catalog or {}}
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack AttributeError: 'RequestContext' object has no attribute 'service_catalog'
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack
2013-01-25 14:50:56 INFO cinder.api.openstack [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail returned with HTTP 500
 
 
cinder api-paste-ini.conf file entries as below
 
#############
# Openstack #
#############
[composite:osapi_volume]
use = call:cinder.api.openstack.urlmap:urlmap_factory
/: osvolumeversions
/v1: openstack_volume_api_v1
[composite:openstack_volume_api_v1]
use = call:cinder.api.auth:pipeline_factory
noauth = faultwrap sizelimit noauth osapi_volume_app_v1
keystone = faultwrap sizelimit authtoken keystonecontext osapi_volume_app_v1
keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_volume_app_v1
[filter:faultwrap]
paste.filter_factory = cinder.api.openstack:FaultWrapper.factory
[filter:noauth]
paste.filter_factory = cinder.api.openstack.auth:NoAuthMiddleware.factory
[filter:sizelimit]
paste.filter_factory = cinder.api.sizelimit:RequestBodySizeLimiter.factory
[app:osapi_volume_app_v1]
paste.app_factory = cinder.api.openstack.volume:APIRouter.factory
[pipeline:osvolumeversions]
pipeline = faultwrap osvolumeversionapp
[app:osvolumeversionapp]
paste.app_factory = cinder.api.openstack.volume.versions:Versions.factory
##########
# Shared #
##########
[filter:keystonecontext]
paste.filter_factory = cinder.api.auth:CinderKeystoneContext.factory
[filter:authtoken]
paste.filter_factory = keystone.middleware.auth_token:filter_factory
service_protocol = http
service_host = 127.0.0.1
service_port = 5000
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = servicepass

cinder.conf
 
[DEFAULT]
logdir = /var/log/cinder
state_path = /var/lib/cinder
lock_path = /var/lib/cinder/tmp
volumes_dir = /etc/cinder/volumes
iscsi_helper = tgtadm
sql_connection = mysql://cinder:cinder@localhost/cinder
rpc_backend = cinder.openstack.common.rpc.impl_qpid
rootwrap_config = /etc/cinder/rootwrap.conf
auth_strategy = keystone
#Added by AK
api_paste_config = /etc/cinder/api-paste.ini
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
volume_api_class=nova.volume.cinder.API
enabled_apis=ec2,osapi_compute,metadata
#End Added by AK
[keystone_authtoken]
admin_tenant_name = service
admin_user = cinder
admin_password = servicepass
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
signing_dirname = /tmp/keystone-signing-cinder
~

Nova.conf
 
[DEFAULT]
logdir = /var/log/nova
state_path = /var/lib/nova
lock_path = /var/lib/nova/tmp
volumes_dir = /etc/nova/volumes
dhcpbridge = /usr/bin/nova-dhcpbridge
dhcpbridge_flagfile = /etc/nova/nova.conf
force_dhcp_release = True
injected_network_template = /usr/share/nova/interfaces.template
libvirt_nonblocking = True
libvirt_inject_partition = -1
network_manager = nova.network.manager.FlatDHCPManager
iscsi_helper = tgtadm
sql_connection = mysql://nova:nova@localhost/nova
compute_driver = libvirt.LibvirtDriver
firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver
rpc_backend = nova.openstack.common.rpc.impl_qpid
rootwrap_config = /etc/nova/rootwrap.conf
volume_api_class = nova.volume.cinder.API
enabled_apis = ec2,osapi_compute,metadata
auth_strategy = keystone
[keystone_authtoken]
admin_tenant_name = service
admin_user = nova
admin_password = servicepass
auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
signing_dir = /tmp/keystone-signing-nova
 
keystonerc file entries.
 
cat keystonerc
#export ADMIN_TOKEN=$(openssl rand -hex 10)
export ADMIN_TOKEN=45763c58ac979f34b3d9
export OS_USERNAME=admin
export OS_PASSWORD=verybadpass
export OS_TENANT_NAME=admin
export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/
export SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/
export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/
export OS_SERVICE_TOKEN=$ADMIN_TOKEN
export SERVICE_TOKEN=$ADMIN_TOKEN
export AUTH_TOKEN=$ADMIN_TOKEN

 
What am I missing?
 
AK