yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #63297
[Bug 1673696] Re: Internal Server error when adding interface from shared network
Reviewed: https://review.openstack.org/446878
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5554d9c5b016bb08c23bba27361bf82dc429f963
Submitter: Jenkins
Branch: master
commit 5554d9c5b016bb08c23bba27361bf82dc429f963
Author: liyingjun <yingjun.li@xxxxxxxxxxxxxxx>
Date: Fri Mar 17 15:55:36 2017 +0800
Use router tenant for interface attach
When trying to add interface from a shared network by other tenant to
router, internal server will be raised.
Should use router tenant id instead of subnet tenant id to create port
when adding interface to router. And from the user's perspective the
port created should belong to the user who created it.
Change-Id: Ib124bbc85b9289940eb3de75a222196479e48e6b
Closes-bug: #1673696
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1673696
Title:
Internal Server error when adding interface from shared network
Status in neutron:
Fix Released
Bug description:
When trying to add interface from a shared network by other tenant to
router, internal server raised.
Step to reproduce:
1. Create a shared network/subnet A in tenant A.
2. In tenant B, try to add interface from network/subnet A.
3. The following error will be raised in neutron-server:
2017-03-17 15:46:56.093 ERROR neutron.api.v2.resource [req-268dbe96-9ed5-4a5b-82c4-eb5521335393 admin test] add_router_interface failed: No details.
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource Traceback (most recent call last):
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/resource.py", line 79, in resource
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource result = method(request=request, **args)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 92, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 88, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 128, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource traceback.format_exc())
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 123, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/api/v2/base.py", line 258, in _handle_action
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource ret_value = getattr(self._plugin, name)(*arg_list, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/l3_db.py", line 1858, in add_router_interface
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource context, router_id, interface_info)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 163, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return method(*args, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 92, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource setattr(e, '_RETRY_EXCEEDED', True)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 88, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 151, in wrapper
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource ectxt.value = e.inner_exc
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_db/api.py", line 139, in wrapper
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*args, **kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 128, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource traceback.format_exc())
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource self.force_reraise()
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource six.reraise(self.type_, self.value, self.tb)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/api.py", line 123, in wrapped
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource return f(*dup_args, **dup_kwargs)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/l3_db.py", line 847, in add_router_interface
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource context, router, interface_info['subnet_id'], device_owner)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/db/l3_db.py", line 810, in _add_interface_by_subnet
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource {'port': port_data}), [subnet], True
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/plugins/common/utils.py", line 182, in create_port
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource check_allow_post=check_allow_post)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource File "/opt/stack/neutron/neutron/plugins/common/utils.py", line 158, in _fixup_res_dict
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource raise ValueError(e.detail)
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource ValueError: Specifying 'project_id' or 'tenant_id' other than authenticated project in request requires admin privileges
2017-03-17 15:46:56.093 TRACE neutron.api.v2.resource
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1673696/+subscriptions
References