dashboard project network column display duplicate default public network randomly (with admin)

Bug #1528465 reported by hgangwx
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Akihiro Motoki

Bug Description

dashboard project network column display duplicate default public network randomly. this occurs randomly

setup:
devstack

reproduce:
yes

steps:
1.check default public network we have
stack@45-59:~/devstack$ neutron net-list
+--------------------------------------+---------+----------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+---------+----------------------------------------------------------+
| 1931775c-4459-4c18-9910-53b1ffbe4d31 | private | 9b1a99a3-e7ae-4a7d-b9d2-e035077d4e5e 10.0.0.0/24 |
| | | 3ebaa37a-2b80-4186-9357-dd8b1202d542 fd7e:7e2b:56d0::/64 |
| b9cedb82-6835-499b-885d-7646416ac93f | public | aea6ea63-b70c-49fe-9bf5-3f593015a07d 172.24.4.0/24 |
| | | 146a2d03-52e0-4c7d-ba77-a9a2df99da7f 2001:db8::/64 |

2.check this on dashborad, we find that it displays two duplicate public network. this occurs randomly

Tags: neutron
hgangwx (hgangwx)
summary: dashboard project network column display duplicate default public
- network
+ network randomly
description: updated
Revision history for this message
Akihiro Motoki (amotoki) wrote :

I could reproduce this by using the latest devstack with Mitaka master branch.
When I logged in as admin role, I got this bug after reloading the project network tab several times.

summary: dashboard project network column display duplicate default public
- network randomly
+ network randomly (with admin)
Changed in horizon:
status: New → Confirmed
Akihiro Motoki (amotoki)
Changed in horizon:
importance: Undecided → Medium
assignee: nobody → Akihiro Motoki (amotoki)
tags: added: neutron
Revision history for this message
Akihiro Motoki (amotoki) wrote :

At now, duplicate check for external networks is done at [2] and the comparison of network objects is checked by the logic of [1].
However, there is a case where some attributes have different values for a same object like [3]. In this case, the order of subnet lists is different.

The logic of [1] is not complete. I suggested the patch author to do so, but it is not correct.

It looks better to check network ID explicitly in dashboard/project/networks/views.py.

[1] https://github.com/openstack/horizon/blob/363a341e9a82d0864d369be84e1ba4470d049e32/openstack_dashboard/api/base.py#L169-L172
[2] https://github.com/openstack/horizon/blob/363a341e9a82d0864d369be84e1ba4470d049e32/openstack_dashboard/dashboards/project/networks/views.py#L54-L58
[3] http://paste.openstack.org/show/482640/

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

Changed in horizon:
status: Confirmed → In Progress
David Lyle (david-lyle)
Changed in horizon:
milestone: none → mitaka-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit 11d973fbe36369cba4b450536c6dff57c0cd6d21
Author: Akihiro Motoki <email address hidden>
Date: Thu Dec 24 15:21:33 2015 +0900

    Fix network duplication check logic

    Previously api.neutron.Network object was compared by using _apidict
    but it did not work when for example the order of subnet list is different.
    This commit changes the comparison logic to use network ID explicitly.
    In addition, it moves the logic to fetch external networks to api.neutron.

    Change-Id: Ie3a42e29c32c17a7f3bf1596b0e09cb73eae9d2a
    Closes-Bug: #1528465

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0rc1

This issue was fixed in the openstack/horizon 9.0.0.0rc1 release candidate.

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.