<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
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.<BR>
 <BR>
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-bb6ea248-a337-4857-af3f-8604930aae38)<BR>
 <BR>
Cinder api log show the following.<BR>
 <BR>
2013-01-25 14:50:56 INFO cinder.api.openstack.wsgi [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] GET <A href="http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail">http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail</A><BR>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<BR>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'<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack Traceback (most recent call last):<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return req.get_response(self.application)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     application, catch_exc_info=False)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     app_iter = application(self.environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self.app(env, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     response = self.app(environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return resp(environ, start_response)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     resp = self.call_func(req, *args, **self.kwargs)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self.func(req, *args, **kwargs)<BR>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__<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     content_type, body, accept)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     action_result = self.dispatch(meth, request, action_args)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return method(req=request, **action_args)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     return self._items(req, entity_maker=_translate_volume_detail_view)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     volumes = self.volume_api.get_all(context, search_opts=search_opts)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     items = cinderclient(context).volumes.list(detailed=True)<BR>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<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack     'access': {'serviceCatalog': context.service_catalog or {}}<BR>2013-01-25 14:50:56 24328 TRACE cinder.api.openstack AttributeError: 'RequestContext' object has no attribute 'service_catalog'<BR>
2013-01-25 14:50:56 24328 TRACE cinder.api.openstack<BR>2013-01-25 14:50:56 INFO cinder.api.openstack [req-bb6ea248-a337-4857-af3f-8604930aae38 631f556d66694a428252a6530b0f5468 789f60d6c7b746ef9cde9ee84161a5f8] <A href="http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail">http://127.0.0.1:8776/v1/789f60d6c7b746ef9cde9ee84161a5f8/volumes/detail</A> returned with HTTP 500<BR>
 <BR>
 <BR>
cinder api-paste-ini.conf file entries as below<BR>
 <BR>
#############<BR># Openstack #<BR>#############<BR>
[composite:osapi_volume]<BR>use = call:cinder.api.openstack.urlmap:urlmap_factory<BR>/: osvolumeversions<BR>/v1: openstack_volume_api_v1<BR>[composite:openstack_volume_api_v1]<BR>use = call:cinder.api.auth:pipeline_factory<BR>noauth = faultwrap sizelimit noauth osapi_volume_app_v1<BR>keystone = faultwrap sizelimit authtoken keystonecontext osapi_volume_app_v1<BR>keystone_nolimit = faultwrap sizelimit authtoken keystonecontext osapi_volume_app_v1<BR>
[filter:faultwrap]<BR>paste.filter_factory = cinder.api.openstack:FaultWrapper.factory<BR>[filter:noauth]<BR>paste.filter_factory = cinder.api.openstack.auth:NoAuthMiddleware.factory<BR>
[filter:sizelimit]<BR>paste.filter_factory = cinder.api.sizelimit:RequestBodySizeLimiter.factory<BR>
[app:osapi_volume_app_v1]<BR>paste.app_factory = cinder.api.openstack.volume:APIRouter.factory<BR>[pipeline:osvolumeversions]<BR>pipeline = faultwrap osvolumeversionapp<BR>[app:osvolumeversionapp]<BR>paste.app_factory = cinder.api.openstack.volume.versions:Versions.factory<BR>##########<BR># Shared #<BR>##########<BR>[filter:keystonecontext]<BR>paste.filter_factory = cinder.api.auth:CinderKeystoneContext.factory<BR>[filter:authtoken]<BR>paste.filter_factory = keystone.middleware.auth_token:filter_factory<BR>service_protocol = http<BR>service_host = 127.0.0.1<BR>service_port = 5000<BR>auth_host = 127.0.0.1<BR>auth_port = 35357<BR>auth_protocol = http<BR>admin_tenant_name = service<BR>admin_user = cinder<BR>admin_password = servicepass<BR><BR>
cinder.conf<BR>
 <BR>
[DEFAULT]<BR>logdir = /var/log/cinder<BR>state_path = /var/lib/cinder<BR>lock_path = /var/lib/cinder/tmp<BR>volumes_dir = /etc/cinder/volumes<BR>iscsi_helper = tgtadm<BR>sql_connection = mysql://cinder:cinder@localhost/cinder<BR>rpc_backend = cinder.openstack.common.rpc.impl_qpid<BR>rootwrap_config = /etc/cinder/rootwrap.conf<BR>auth_strategy = keystone<BR>
#Added by AK<BR>api_paste_config = /etc/cinder/api-paste.ini<BR>volume_name_template = volume-%s<BR>volume_group = cinder-volumes<BR>verbose = True<BR>volume_api_class=nova.volume.cinder.API<BR>enabled_apis=ec2,osapi_compute,metadata<BR>
#End Added by AK<BR>
[keystone_authtoken]<BR>admin_tenant_name = service<BR>admin_user = cinder<BR>admin_password = servicepass<BR>auth_host = 127.0.0.1<BR>auth_port = 35357<BR>auth_protocol = http<BR>signing_dirname = /tmp/keystone-signing-cinder<BR>~<BR><BR>
Nova.conf<BR>
 <BR>
[DEFAULT]<BR>logdir = /var/log/nova<BR>state_path = /var/lib/nova<BR>lock_path = /var/lib/nova/tmp<BR>volumes_dir = /etc/nova/volumes<BR>dhcpbridge = /usr/bin/nova-dhcpbridge<BR>dhcpbridge_flagfile = /etc/nova/nova.conf<BR>force_dhcp_release = True<BR>injected_network_template = /usr/share/nova/interfaces.template<BR>libvirt_nonblocking = True<BR>libvirt_inject_partition = -1<BR>network_manager = nova.network.manager.FlatDHCPManager<BR>iscsi_helper = tgtadm<BR>sql_connection = mysql://nova:nova@localhost/nova<BR>compute_driver = libvirt.LibvirtDriver<BR>firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver<BR>rpc_backend = nova.openstack.common.rpc.impl_qpid<BR>rootwrap_config = /etc/nova/rootwrap.conf<BR>volume_api_class = nova.volume.cinder.API<BR>enabled_apis = ec2,osapi_compute,metadata<BR>auth_strategy = keystone<BR>
[keystone_authtoken]<BR>admin_tenant_name = service<BR>admin_user = nova<BR>admin_password = servicepass<BR>auth_host = 127.0.0.1<BR>auth_port = 35357<BR>auth_protocol = http<BR>signing_dir = /tmp/keystone-signing-nova<BR>
 <BR>
keystonerc file entries.<BR>
 <BR>
cat keystonerc<BR>#export ADMIN_TOKEN=$(openssl rand -hex 10)<BR>export ADMIN_TOKEN=45763c58ac979f34b3d9<BR>export OS_USERNAME=admin<BR>export OS_PASSWORD=verybadpass<BR>export OS_TENANT_NAME=admin<BR>export OS_AUTH_URL=http://127.0.0.1:5000/v2.0/<BR>export SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/<BR>export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/<BR>export OS_SERVICE_TOKEN=$ADMIN_TOKEN<BR>export SERVICE_TOKEN=$ADMIN_TOKEN<BR>export AUTH_TOKEN=$ADMIN_TOKEN<BR><BR>
 <BR>
What am I missing?<BR>
 <BR>
AK<BR><BR>                                    </div></body>
</html>