Unable to create router when the external network is specified

Bug #1733047 reported by wei.ying
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
High
wei.ying

Bug Description

Env: devstack master branch

Steps to reproduce:

1. Go to Project/Network Routers panel
2. Click Create Router button
3. Choose an external network and on form submit

Error info:
INFO openstack_dashboard.dashboards.project.routers.forms Failed to create router: 'CreateForm' object has no attribute 'ext_gw_mode_supported'
ERROR django.request Internal Server Error: /project/routers/create/
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/opt/stack/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/django/views/generic/edit.py", line 183, in post
    return self.form_valid(form)
  File "/opt/stack/horizon/horizon/forms/views.py", line 188, in form_valid
    exceptions.handle(self.request)
  File "/opt/stack/horizon/horizon/exceptions.py", line 351, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/opt/stack/horizon/horizon/forms/views.py", line 185, in form_valid
    handled = form.handle(self.request, form.cleaned_data)
  File "/opt/stack/horizon/openstack_dashboard/dashboards/project/routers/forms.py", line 141, in handle
    if exc.status_code == 409:
AttributeError: 'exceptions.AttributeError' object has no attribute 'status_code'
ERROR django.server "POST /project/routers/create/ HTTP/1.1" 500 145275

Tags: neutron
wei.ying (wei.yy)
Changed in horizon:
assignee: nobody → wei.ying (wei.yy)
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/521238

Changed in horizon:
status: New → In Progress
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → High
milestone: none → queens-2
tags: added: neutron
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/521238
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=de9f03c9ab3d95ce2e21a22822f0f3902f489760
Submitter: Zuul
Branch: master

commit de9f03c9ab3d95ce2e21a22822f0f3902f489760
Author: wei.ying <email address hidden>
Date: Sat Nov 18 15:40:41 2017 +0800

    Unable to create router when the external network is specified

    In project create router form, when creating router with the external
    network, there is no need to determine "ext_gw_mode_supported" since
    the "ext_gw-mode" has been checked when the form is initialized.
    So, we need to delete it since it's also undefined.

    Change-Id: I6dc221638ccda2a8819776679735685cb3c61d56
    Closes-Bug:#1733047

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b2

This issue was fixed in the openstack/horizon 13.0.0.0b2 development milestone.

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.