Keystone v3 cannot list neutron ports and policies with bad admin context

Bug #1549941 reported by Jakub Pavlik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
In Progress
Medium
Jakub Pavlik
R2.20
Fix Committed
Medium
Jakub Pavlik
R2.22.x
Fix Committed
Medium
Jakub Pavlik

Bug Description

Member from non-default domain is not able run:

neutron port-list
neutron subnet-create

It is caused by changes in calling admin role context in Neutron Liberty:

 > /usr/lib/python2.7/dist-packages/neutron/context.py(123)__init__()
-> super(Context, self).__init__(*args, **kwargs)
(Pdb) p kwargs
{'tenant_id': None, 'is_admin': True, 'overwrite': False, 'user_id': None}
(Pdb) n
> /usr/lib/python2.7/dist-packages/neutron/context.py(124)__init__()
-> self._session = None
(Pdb)
--Return--
> /usr/lib/python2.7/dist-packages/neutron/context.py(124)__init__()->None
-> self._session = None
(Pdb)
--Return--
> /usr/lib/python2.7/dist-packages/neutron/context.py(139)get_admin_context()-><neutron...525d7610>
-> overwrite=False)
(Pdb) list
134 @removals.removed_kwarg('load_admin_roles')
135 def get_admin_context(read_deleted="no", load_admin_roles=True):
136 return Context(user_id=None,
137 tenant_id=None,
138 is_admin=True,
139 -> overwrite=False)
140

I requires modification in vnc_openstack/neutron_plugin_interface.py

- role = string.join(context['roles'], ",")
+ if 'roles' not in context and context['is_admin']:
+ role = 'admin'
+ else:
+ role = string.join(context['roles'], ",")

information type: Proprietary → Public
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.20

Review in progress for https://review.opencontrail.org/17844
Submitter: Jakub Pavlik (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R2.22.x

Review in progress for https://review.opencontrail.org/17845
Submitter: Jakub Pavlik (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/17845
Committed: http://github.org/Juniper/contrail-controller/commit/92a8ada53e0c2ec9a91f865efd0064017eb38c47
Submitter: Zuul
Branch: R2.22.x

commit 92a8ada53e0c2ec9a91f865efd0064017eb38c47
Author: Jakub Pavlik <email address hidden>
Date: Thu Feb 25 20:37:22 2016 +0100

Fix for roles admin in neutron listing in Keystone v3

Closes-bug: 1549941
Change-Id: Ic1daa9d76c1da581db4e40e0480fee6740809602

Changed in juniperopenstack:
status: New → In Progress
assignee: nobody → Jakub Pavlik (pavlk-jakub)
Changed in juniperopenstack:
importance: Undecided → Medium
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/17844
Committed: http://github.org/Juniper/contrail-controller/commit/615691e9d391eb6eea840654d969f2a067334dbf
Submitter: Zuul
Branch: R2.20

commit 615691e9d391eb6eea840654d969f2a067334dbf
Author: Jakub Pavlik <email address hidden>
Date: Thu Feb 25 20:37:22 2016 +0100

Fix for roles admin in neutron listing in Keystone v3

Closes-bug: 1549941
Change-Id: Ic1daa9d76c1da581db4e40e0480fee6740809602

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.