external network with subnet on network topology does not have subnet listed in pop up dialog when click

Bug #1702739 reported by Gloria Gu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Unassigned

Bug Description

Based on latest master as of 7/6/2017

How to reproduce:

As a admin user, find an external network which has a subnet or create an external network with subnet in admin -> network panel

Go to network topology, graph tab, click the network icon created above, it should pop up a small dialog. The subnet is not listed and no delete subnet button.

Expected:
the subnet should show up for an external network and there is a delete subnet button.

Gloria Gu (gloria-gu)
summary: - network with subnet on network toplogy does not have subnet listed in
- pop up card when click
+ network with subnet on network topology does not have subnet listed in
+ pop up dialog when click
Revision history for this message
Gloria Gu (gloria-gu) wrote : Re: network with subnet on network topology does not have subnet listed in pop up dialog when click

horizon.networktopology.js

in the following block
 nodeEnter.on('click', function(d) {
      self.show_balloon(d.data, d, angular.element(this));
    });

d.data has subnets empty

Changed in horizon:
assignee: nobody → Gloria Gu (gloria-gu)
Revision history for this message
Gloria Gu (gloria-gu) wrote :

horizon.networktopologycommon.js, data comes in with empty subnet
update:function() {
    var self = this;
    angular.element.getJSON(
      angular.element('#networktopology').data('networktopology') + '?' + angular.element.now(),
      function(data) {
        self.model = data;
        $('#networktopology').trigger('change');
        self.update_timer = setTimeout(function(){
          self.update();
        }, self.reload_duration);
      }
    );
  },

Revision history for this message
Gloria Gu (gloria-gu) wrote :

network_topology views.py the following code cause add_resource_url to fail silently
for subnet in publicnet.subnets:
                        snet = {'id': subnet.id,
                                'cidr': subnet.cidr}
                        self.add_resource_url(
                            'horizon:project:networks:subnets:detail', snet)
                        subnets.append(snet)
                except Exception:
                    subnets = []

description: updated
Gloria Gu (gloria-gu)
Changed in horizon:
status: New → In Progress
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/481320

Gloria Gu (gloria-gu)
summary: - network with subnet on network topology does not have subnet listed in
- pop up dialog when click
+ non-shared network with subnet on network topology does not have subnet
+ listed in pop up dialog when click
description: updated
Revision history for this message
Lucas H. Xu (xuh-2) wrote : Re: non-shared network with subnet on network topology does not have subnet listed in pop up dialog when click

I cannot reproduce this bug now. I was able to confirm. Maybe a fix in another patch?

Revision history for this message
Gloria Gu (gloria-gu) wrote :

@Lucas, in the process of rebuilding system...once it is up...will try again.

Revision history for this message
Gloria Gu (gloria-gu) wrote :

@Lucas, I checked the latest master code ...looks like the problem is still there:

in network_topology/views.py
line 306 snet is an object
line 308 call self.add_resource_url with snet object

line 211 where add_resource_url is defined...line 223, it will fail here silently since snet is not an array.

openstack system setup doesn't seem to be happy, I have to reset it up again...but I expect the problem should still exist.

Revision history for this message
Lucas H. Xu (xuh-2) wrote :

Thanks for updating this. We may be Rob and other people to help us confirm this. I still cannot reproduce this. Thanks!

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

I cannot reproduce this in the latest commit as well (commit 7640903b2b5c91c00bbac1a9aeef6d893f7f14eb).

https://review.openstack.org/#/c/465778/ improves the logic which retrieve network_get, but I am not sure this is related to this bug and the reproduce-ability.

Revision history for this message
Gloria Gu (gloria-gu) wrote :

@Akihiro, @Lucas I am not actively working on Horizon. If it is not reproducible, please close this.

Akihiro Motoki (amotoki)
Changed in horizon:
assignee: Gloria Gu (gloria-gu) → nobody
Revision history for this message
Akihiro Motoki (amotoki) wrote :

@Gloria,
Looking at the proposed patch, it seems the reported issues is NOT about a general network with subnets.
It is specific to an external network ("router:external" network attribute is True). Is it right?
If so the issue still exists but the bug description and title should be updated.

Temporarily I mark this Incomplete.

tags: added: topology-view
Changed in horizon:
status: In Progress → Incomplete
Revision history for this message
Gloria Gu (gloria-gu) wrote :

@Akihiro, I will take a look again...and let you know.

Revision history for this message
Gloria Gu (gloria-gu) wrote :

Tried with latest master...noticed there are some changes .... before it was just creating a non-shared network can observe the problem. Now ...creating a non-shared network seems to be ok now. But if the network is an external network type...it still has the problem.

@Akihiro, I pasted the external network data printed from running the latest master code. I masked some of the real ides and ip addresses.

<Network: {u'provider:physical_network': None, u'updated_at': u'2017-10-04T22:49:39Z', u'dns_domain': u'', u'revision_number': 5, u'provider:network_type': u'vxlan', u'id': u'11111111111111111', u'router:external': True, u'availability_zone_hints': [], u'availability_zones': [u'nova'], u'router__external': True, u'ipv4_address_scope': None, u'shared': False, u'project_id': u'11111111111111111', u'status': u'ACTIVE', u'subnets': [<Subnet: {u'service_types': [], u'description': u'', u'enable_dhcp': False, u'network_id': u'11111111111111111', u'tenant_id': u'11111111111111111', u'created_at': u'2017-10-04T22:49:39Z', u'dns_nameservers': [], u'updated_at': u'2017-10-04T22:49:39Z', 'ipver_str': 'IPv4', u'ipv6_ra_mode': None, u'allocation_pools': [{u'start': u'1.2.2.3', u'end': u'12.3.4.5}], u'gateway_ip': u'1.2.3.6', u'revision_number': 2, u'ipv6_address_mode': None, u'ip_version': 4, u'host_routes': [], u'cidr': u'1.1.1.1/16', u'project_id': u'11111111111111111', u'id': u'11111111111111111', u'subnetpool_id': None, u'name': u''}>], u'provider__network_type': u'vxlan', u'provider__physical_network': None, u'description': u'', u'tags': [], u'ipv6_address_scope': None, u'is_default': False, 'admin_state': 'UP', u'provider:segmentation_id': 1111, u'name': u'ext-net', u'admin_state_up': True, u'tenant_id': u'11111111111111111', u'created_at': u'2017-10-04T22:49:32Z', u'mtu': 1450, u'provider__segmentation_id': 1070}>

I applied the changes in the review...it seems to work.

summary: - non-shared network with subnet on network topology does not have subnet
+ external network with subnet on network topology does not have subnet
listed in pop up dialog when click
Revision history for this message
Gloria Gu (gloria-gu) wrote :

Think the changes still valid.

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

Thanks for the clarification.

Yes, subnet information of an external network is not shown. It is not easy to know a current user has enough permission to show subnet on an external network. Perhaps what we need is to try to retrieve subnet information and to return subnet information if it is retrieved successfully.

Changed in horizon:
status: Incomplete → Confirmed
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

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

commit f20dacf466c982e737c5ee79ae675d8d12e1e65d
Author: gugl <email address hidden>
Date: Thu Jul 6 16:38:47 2017 -0700

    Fix subnet no show in networktopology graph

    This checkin is to fix:

    When login as admin, non-shared network's subnet failed to show
    up in network toplogy graph when click on the network which
    has subnets.

    Change-Id: I3677b33eb234e70e69ee9a9231de13cafe970c0f
    Closes-bug: #1702739

Changed in horizon:
status: Confirmed → Fix Released
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 13.0.0.0b1

This issue was fixed in the openstack/horizon 13.0.0.0b1 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.