← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1394051] Re: Can't display port list on a shared network in "Manage Floating IP Associations" page

 

** Changed in: horizon/juno
       Status: Fix Committed => Fix Released

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

Title:
  Can't display port list on a shared network in "Manage Floating IP
  Associations" page

Status in OpenStack Dashboard (Horizon):
  Fix Released
Status in OpenStack Dashboard (Horizon) juno series:
  Fix Released

Bug description:
  
  I used below command to configure floating IP. Juno on CentOS 7.

  neutron net-create public --shared  --router:external True
  --provider:network_type vlan --provider:physical_network physnet2
  --provider:segmentation_id 125

  neutron subnet-create public --name public-subnet \
    --allocation-pool start=125.2.249.170,end=125.2.249.248 \
    --disable-dhcp --gateway 125.2.249.1 --dns-nameserver 125.1.166.20 125.2.249.0/24

  neutron net-create  --shared OAM120 \
    --provider:network_type vlan --provider:physical_network physnet2 --provider:segmentation_id 120

  neutron subnet-create --name oam120-subnet \
    --allocation-pool start=192.168.120.1,end=192.168.120.200 \
    --gateway 192.168.120.254 --dns-nameserver 10.1.1.1 --dns-nameserver 125.1.166.20 OAM120 192.168.120.0/24

  neutron router-create my-router

  neutron router-interface-add my-router oam120-subnet

  neutron router-gateway-set my-router public

  
  Just checked the dashborad code, It seems that there are some errors in below code.

  /usr/share/openstack-dashboard/openstack_dashboard/api/neutron.py
      def _get_reachable_subnets(self, ports):
          # Retrieve subnet list reachable from external network
          ext_net_ids = [ext_net.id for ext_net in self.list_pools()]
          gw_routers = [r.id for r in router_list(self.request)
                        if (r.external_gateway_info and
                            r.external_gateway_info.get('network_id')
                            in ext_net_ids)]
          reachable_subnets = set([p.fixed_ips[0]['subnet_id'] for p in ports
                                   if ((p.device_owner ==
                                        'network:router_interface')
                                       and (p.device_id in gw_routers))])
          return reachable_subnets

  
  Why only list "device_owner = 'network:router_interface'", I guess it should list all "device_owner = 'compute:xxx'"

  Here is my work around:
  diff output:
  /usr/share/openstack-dashboard
  [root@jn-controller openstack-dashboard]# diff ./openstack_dashboard/api/neutron.py.orig ./openstack_dashboard/api/neutron.py
  413,415c415
  <                                  if ((p.device_owner ==
  <                                       'network:router_interface')
  <                                      and (p.device_id in gw_routers))])
  ---
  >                                  if (p.device_owner.startswith('compute:'))])

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


References