← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1304533] [NEW] KeyError on router add-interface error handle

 

Public bug reported:

Under some circumstances (and I'm not entirely sure which) the exception
handling on adding an interface to a router will produce a KeyError.

The exception happens in
openstack_dashboard/dashboards/project/routers/ports/forms.py in
AddInterface.populate_subnet_id_choices.

In the exception handling code, a reverse() is called an argument of
request.REQUEST['router_id'] which doesn't always exist.

The fix is quite simple: try to look for it in the initial form data as
well, and if 'router_id' is in neither location, fall-back to the index
page.

** Affects: horizon
     Importance: Undecided
     Assignee: Matthew D. Wood (woodm1979)
         Status: New

** Changed in: horizon
     Assignee: (unassigned) => Matthew D. Wood (woodm1979)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1304533

Title:
  KeyError on router add-interface error handle

Status in OpenStack Dashboard (Horizon):
  New

Bug description:
  Under some circumstances (and I'm not entirely sure which) the
  exception handling on adding an interface to a router will produce a
  KeyError.

  The exception happens in
  openstack_dashboard/dashboards/project/routers/ports/forms.py in
  AddInterface.populate_subnet_id_choices.

  In the exception handling code, a reverse() is called an argument of
  request.REQUEST['router_id'] which doesn't always exist.

  The fix is quite simple: try to look for it in the initial form data
  as well, and if 'router_id' is in neither location, fall-back to the
  index page.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1304533/+subscriptions


Follow ups

References