An error occurred when trying to create a port on a network owned by a different project

Bug #1689328 reported by György Szombathelyi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
In Progress
Medium
Akihiro Motoki

Bug Description

Creating a port in an external network results in the error message in the title.
The backtrace:

[Mon May 08 15:27:02.722361 2017] [wsgi:error] [pid 2907:tid 140386830882560] Internal Server Error: /horizon/admin/networks/a2acaf3f-d1a9-4a1b-9f41-3bf878e580fe/ports/create
[Mon May 08 15:27:02.722376 2017] [wsgi:error] [pid 2907:tid 140386830882560] Traceback (most recent call last):
[Mon May 08 15:27:02.722378 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 132, in get_response
[Mon May 08 15:27:02.722380 2017] [wsgi:error] [pid 2907:tid 140386830882560] response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Mon May 08 15:27:02.722381 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/horizon/decorators.py", line 36, in dec
[Mon May 08 15:27:02.722383 2017] [wsgi:error] [pid 2907:tid 140386830882560] return view_func(request, *args, **kwargs)
[Mon May 08 15:27:02.722384 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/horizon/decorators.py", line 52, in dec
[Mon May 08 15:27:02.722386 2017] [wsgi:error] [pid 2907:tid 140386830882560] return view_func(request, *args, **kwargs)
[Mon May 08 15:27:02.722387 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/horizon/decorators.py", line 36, in dec
[Mon May 08 15:27:02.722395 2017] [wsgi:error] [pid 2907:tid 140386830882560] return view_func(request, *args, **kwargs)
[Mon May 08 15:27:02.722396 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/horizon/decorators.py", line 84, in dec
[Mon May 08 15:27:02.722397 2017] [wsgi:error] [pid 2907:tid 140386830882560] return view_func(request, *args, **kwargs)
[Mon May 08 15:27:02.722399 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 71, in view
[Mon May 08 15:27:02.722400 2017] [wsgi:error] [pid 2907:tid 140386830882560] return self.dispatch(request, *args, **kwargs)
[Mon May 08 15:27:02.722401 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/lib/python2.7/dist-packages/django/views/generic/base.py", line 89, in dispatch
[Mon May 08 15:27:02.722402 2017] [wsgi:error] [pid 2907:tid 140386830882560] return handler(request, *args, **kwargs)
[Mon May 08 15:27:02.722404 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/lib/python2.7/dist-packages/django/views/generic/edit.py", line 205, in get
[Mon May 08 15:27:02.722405 2017] [wsgi:error] [pid 2907:tid 140386830882560] form = self.get_form()
[Mon May 08 15:27:02.722406 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/horizon/forms/views.py", line 168, in get_form
[Mon May 08 15:27:02.722407 2017] [wsgi:error] [pid 2907:tid 140386830882560] return form_class(self.request, **self.get_form_kwargs())
[Mon May 08 15:27:02.722409 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/admin/networks/ports/forms.py", line 98, in __init__
[Mon May 08 15:27:02.722410 2017] [wsgi:error] [pid 2907:tid 140386830882560] subnet_choices = self._get_subnet_choices(kwargs['initial'])
[Mon May 08 15:27:02.722411 2017] [wsgi:error] [pid 2907:tid 140386830882560] File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/admin/networks/ports/forms.py", line 151, in _get_subnet_choices
[Mon May 08 15:27:02.722413 2017] [wsgi:error] [pid 2907:tid 140386830882560] for subnet in network.subnets]
[Mon May 08 15:27:02.722414 2017] [wsgi:error] [pid 2907:tid 140386830882560] AttributeError: 'unicode' object has no attribute 'id'

Maybe it has the same origin as the instance launch panel doesn't list external networks anymore for an admin user.

Revision history for this message
György Szombathelyi (gyurco) wrote :

With the neutron api, there is no problem to create a port in ext-net via an admin user.

Revision history for this message
Akihiro Motoki (amotoki) wrote :

This happens when an admin tries to create a port on a different project. It is not specific to an external network.

Changed in horizon:
importance: Undecided → Medium
status: New → Confirmed
summary: - Danger: An error occurred when trying to create a port in an external
- network
+ An error occurred when trying to create a port on a network owned by a
+ different project
Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
milestone: none → pike-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/465778

Changed in horizon:
status: Confirmed → In Progress
Changed in horizon:
milestone: pike-2 → pike-3
Changed in horizon:
assignee: Akihiro Motoki (amotoki) → nobody
milestone: pike-3 → none
Changed in horizon:
assignee: nobody → Akihiro Motoki (amotoki)
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.