Gate failing on test_routerrule_detail

Bug #1490403 reported by Frode Nordahl
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Critical
Frode Nordahl
Kilo
Fix Released
Undecided
Unassigned

Bug Description

The gate/jenkins checks is currently bombing out on this error:

ERROR: test_routerrule_detail (openstack_dashboard.dashboards.project.routers.tests.RouterRuleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/horizon/openstack_dashboard/test/helpers.py", line 111, in instance_stub_out
    return fn(self, *args, **kwargs)
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/tests.py", line 711, in test_routerrule_detail
    res = self._get_detail(router)
  File "/home/ubuntu/horizon/openstack_dashboard/test/helpers.py", line 111, in instance_stub_out
    return fn(self, *args, **kwargs)
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/tests.py", line 49, in _get_detail
    args=[router.id]))
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 470, in get
    **extra)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 286, in get
    return self.generic('GET', path, secure=secure, **r)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 358, in generic
    return self.request(**r)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/test/client.py", line 440, in request
    six.reraise(*exc_info)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/ubuntu/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/home/ubuntu/horizon/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/home/ubuntu/horizon/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/home/ubuntu/horizon/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/home/ubuntu/horizon/.venv/local/lib/python2.7/site-packages/django/views/generic/base.py", line 87, in dispatch
    return handler(request, *args, **kwargs)
  File "/home/ubuntu/horizon/horizon/tabs/views.py", line 146, in get
    context = self.get_context_data(**kwargs)
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/views.py", line 140, in get_context_data
    context = super(DetailView, self).get_context_data(**kwargs)
  File "/home/ubuntu/horizon/horizon/tables/views.py", line 107, in get_context_data
    context = super(MultiTableMixin, self).get_context_data(**kwargs)
  File "/home/ubuntu/horizon/horizon/tabs/views.py", line 56, in get_context_data
    exceptions.handle(self.request)
  File "/home/ubuntu/horizon/horizon/exceptions.py", line 359, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/home/ubuntu/horizon/horizon/tabs/views.py", line 54, in get_context_data
    context["tab_group"].load_tab_data()
  File "/home/ubuntu/horizon/horizon/tabs/base.py", line 128, in load_tab_data
    exceptions.handle(self.request)
  File "/home/ubuntu/horizon/horizon/exceptions.py", line 359, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/home/ubuntu/horizon/horizon/tabs/base.py", line 125, in load_tab_data
    tab._data = tab.get_context_data(self.request)
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tabs.py", line 82, in get_context_data
    data["rulesmatrix"] = self.get_routerrulesgrid_data(rules)
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tabs.py", line 127, in get_routerrulesgrid_data
    source, target, rules))
  File "/home/ubuntu/horizon/openstack_dashboard/dashboards/project/routers/extensions/routerrules/tabs.py", line 159, in _get_subnet_connectivity
    if (int(dst.network) >= int(rd.broadcast) or
TypeError: int() argument must be a string or a number, not 'NoneType'

Frode Nordahl (fnordahl)
affects: horizon (Ubuntu) → horizon
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/218763

Changed in horizon:
assignee: nobody → Frode Nordahl (fnordahl)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Frode Nordahl (<email address hidden>) on branch: master
Review: https://review.openstack.org/218763
Reason: Don't fix someone elses code for fixing a gate test problem. New proposal that skips the test will be proposed.

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/218786

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

This error is caused by the new release of netaddr 0.7.16 or later.
0.7.16 has backward incompat change and
'broadcast' attribute returns None for /31 or /32 network.
I think this causes the gate error.

Changed in horizon:
importance: Undecided → Critical
milestone: none → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (master)

Reviewed: https://review.openstack.org/218786
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=e2d7d321129fe574520bdbe32279c22efc1b3ba3
Submitter: Jenkins
Branch: master

commit e2d7d321129fe574520bdbe32279c22efc1b3ba3
Author: Frode Nordahl <email address hidden>
Date: Mon Aug 31 11:23:32 2015 +0200

    Skip test_routerrule_detail blocking the gate

    Change-Id: Ida700555c133e27da2c76357986adfc8193fe89b
    Related-Bug: 1490403

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to horizon (stable/kilo)

Related fix proposed to branch: stable/kilo
Review: https://review.openstack.org/219045

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to horizon (stable/kilo)

Reviewed: https://review.openstack.org/219045
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=7c8fc8f1b08e4ecce1e481c23bb1ff8309ba928f
Submitter: Jenkins
Branch: stable/kilo

commit 7c8fc8f1b08e4ecce1e481c23bb1ff8309ba928f
Author: Frode Nordahl <email address hidden>
Date: Mon Aug 31 11:23:32 2015 +0200

    Skip test_routerrule_detail blocking the gate

    Change-Id: Ida700555c133e27da2c76357986adfc8193fe89b
    Related-Bug: 1490403
    (cherry picked from commit e2d7d321129fe574520bdbe32279c22efc1b3ba3)

tags: added: in-stable-kilo
Revision history for this message
Frode Nordahl (fnordahl) wrote :

The first proposal has been re-opened and I believe it should be merged as a replacement for the quick-fix to merged earlier to unblock the gate.

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

Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-3 → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/218763
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=749aecda4c81f68eb1e4c0c9d10075135eb5ef81
Submitter: Jenkins
Branch: master

commit 749aecda4c81f68eb1e4c0c9d10075135eb5ef81
Author: Frode Nordahl <email address hidden>
Date: Mon Aug 31 10:25:27 2015 +0200

    Fix usage of netaddr '.broadcast'

    netaddr 0.7.16 changed the behavior of IPNetworks with /31 and /32
    prefixes to make their 'broadcast' attribute return None. This patch
    replaces the use of the attribute with a -1 index lookup to get the
    last address instead.

    Revert Ida700555c133e27da2c76357986adfc8193fe89b and re-enables the
    test_routerrule_detail test.

    Change-Id: I0887b0112f97b537e4c1467c47ab78b1f94f238b
    Closes-Bug: 1490403
    Closes-Bug: 1490423

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: liberty-rc1 → 8.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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