After updating devstack I can no longer list floating ips.
steps:
1) install essex devstack (master branch)
2) create a collection of floating ips (default)
3) login as a non-admin user (demo is created by default)
4) click on floating ips
5) click allocate
Expected:
after step 4 you should see a blank list, after step 5 you should see a single ip
Actual:
Allocation seemed to succeed but horizon reported in both step 4/5:
Error: Error fetching floating ips: The server has either erred or is incapable of performing the requested operation.
---
If I look at nova-api I see an error that nova is (improperly) attempting to check for admin-ness. Members of a project should be able to list IPs for their project.
2011-12-10 14:39:55,358 ERROR nova.api.openstack.v2 [58258ebc-16ac-4d87-8026-a1ddafb7d13f jesse 11] Caught error: Remote error: AdminRequired User does not have admin privileges
[u'Traceback (most recent call last):\n', u' File "/opt/stack/nova/nova/rpc/impl_kombu.py", line 620, in _process_data\n rval = node_func(context=ctxt, **node_args)\n', u' File "/opt/stack/nova/nova/network/manager.py", line 434, in get_floating_ips_by_project\n context.project_id)\n', u' File "/opt/stack/nova/nova/db/api.py", line 294, in floating_ip_get_all_by_project\n return IMPL.floating_ip_get_all_by_project(context, project_id)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 113, in wrapper\n return f(*args, **kwargs)\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 616, in floating_ip_get_all_by_project\n return _floating_ip_get_all(context).\\\n', u' File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 94, in wrapper\n raise exception.AdminRequired()\n', u'AdminRequired: User does not have admin privileges\n'].
(nova.api.openstack.v2): TRACE: Traceback (most recent call last):
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/api/openstack/v2/__init__.py", line 61, in __call__
(nova.api.openstack.v2): TRACE: return req.get_response(self.application)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
(nova.api.openstack.v2): TRACE: application, catch_exc_info=False)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
(nova.api.openstack.v2): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack.v2): TRACE: File "/opt/stack/keystone/keystone/middleware/auth_token.py", line 212, in __call__
(nova.api.openstack.v2): TRACE: return self._forward_request(env, start_response, proxy_headers)
(nova.api.openstack.v2): TRACE: File "/opt/stack/keystone/keystone/middleware/auth_token.py", line 344, in _forward_request
(nova.api.openstack.v2): TRACE: return self.app(env, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
(nova.api.openstack.v2): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
(nova.api.openstack.v2): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 499, in __call__
(nova.api.openstack.v2): TRACE: response = req.get_response(self.application)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, in get_response
(nova.api.openstack.v2): TRACE: application, catch_exc_info=False)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, in call_application
(nova.api.openstack.v2): TRACE: app_iter = application(self.environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, in __call__
(nova.api.openstack.v2): TRACE: response = self.app(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in __call__
(nova.api.openstack.v2): TRACE: return resp(environ, start_response)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in __call__
(nova.api.openstack.v2): TRACE: resp = self.call_func(req, *args, **self.kwargs)
(nova.api.openstack.v2): TRACE: File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in call_func
(nova.api.openstack.v2): TRACE: return self.func(req, *args, **kwargs)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 567, in __call__
(nova.api.openstack.v2): TRACE: action_result = self.dispatch(request, action, args)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/api/openstack/wsgi.py", line 599, in dispatch
(nova.api.openstack.v2): TRACE: return controller_method(req=request, **action_args)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/api/openstack/v2/contrib/floating_ips.py", line 75, in index
(nova.api.openstack.v2): TRACE: floating_ips = self.network_api.get_floating_ips_by_project(context)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/network/api.py", line 51, in get_floating_ips_by_project
(nova.api.openstack.v2): TRACE: {'method': 'get_floating_ips_by_project'})
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/rpc/__init__.py", line 45, in call
(nova.api.openstack.v2): TRACE: return get_impl().call(context, topic, msg)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/rpc/impl_kombu.py", line 747, in call
(nova.api.openstack.v2): TRACE: rv = list(rv)
(nova.api.openstack.v2): TRACE: File "/opt/stack/nova/nova/rpc/impl_kombu.py", line 715, in __iter__
(nova.api.openstack.v2): TRACE: raise result
Seems to be a side effect of https:/ /github. com/openstack/ nova/commit/ c40ee5cfe75e8b1 209dc53fc7eb209 7812efa54e
line 616 calls _floating_ ip_get_ all which requires admin
We could either send a context_elevated or redo the way the call is made