[Bug 1702466] Fix included in openstack/horizon 12.0.3
OpenStack Infra
1702466 at bugs.launchpad.net
Tue May 8 13:17:28 UTC 2018
This issue was fixed in the openstack/horizon 12.0.3 release.
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to horizon in Ubuntu.
https://bugs.launchpad.net/bugs/1702466
Title:
Subnet details page fails when a subnet uses IPv6 with prefix
delegation
Status in OpenStack Dashboard (Horizon):
Fix Released
Status in horizon package in Ubuntu:
Fix Released
Bug description:
Package: openstack-dashboard
Description: Ubuntu 16.04.2 LTS
Release: 16.04
openstack-dashboard:
Installed: 2:9.1.2-0ubuntu1
Candidate: 2:9.1.2-0ubuntu1
Description: problem occurs when using an IPv6 subnet with prefix
delegation (IPv4 subnets are ok). When using web interface, if we try
to see subnet details in menu System -> Networks -> Click on network
name -> Click on subnet name we got the following error:
neutron-server[22658]: 2017-07-04 16:29:21.186 22864 INFO neutron.wsgi
[req-0fbaad92-83ff-4179-8056-8521fbef5ff9
e85813733498d6d6b6678b77d4756aaddef55bba18166be7d3bc3a8d20a65fd8
769822d4bf984cfeb3ab910cec9fa5b3 - - -] 192.168.0.1 - - [04/Jul/2017
16:29:21] "GET /v2.0/subnetpools/prefix_delegation.json HTTP/1.1" 404
266 0.007587
The subnet is working fine. Here is the output of opentack CLI 'show'
statement:
$ openstack subnet show nti-subnet-ipv6
+-------------------+-------------------------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------------------------+
| allocation_pools | 2001:DB8:1400:5026::2-2001:DB8:1400:5026:ffff:ffff:ffff:ffff|
| cidr | 2001:DB8:1400:5026::/64 |
| created_at | 2016-09-12T13:01:15 |
| description | |
| dns_nameservers | 2001:DB8:1400:2127::FFFE |
| enable_dhcp | True |
| gateway_ip | 2001:DB8:1400:5026::1 |
| host_routes | |
| id | 129bd534-7121-4759-93a2-68ac907edf74 |
| ip_version | 6 |
| ipv6_address_mode | dhcpv6-stateless |
| ipv6_ra_mode | dhcpv6-stateless |
| name | nti-subnet-ipv6 |
| network_id | d204d9a2-bb8a-48af-bfa0-f0438970d98b |
| project_id | 769822d4bf984cfeb3ab910cec9fa5b3 |
| subnetpool_id | prefix_delegation |
| updated_at | 2017-05-31T18:59:50 |
+-------------------+------------------------------------------------------------ +
Trying to find the problem, I found the file
openstack_dashboard/dashboards/project/networks/subnets/views.py with
this code (comments are mine):
class DetailView(tabs.TabView):
tab_group_class = project_tabs.SubnetDetailTabs
template_name = 'horizon/common/_detail.html'
page_title = "{{ subnet.name|default:subnet.id }}"
@memoized.memoized_method
def get_data(self):
subnet_id = self.kwargs['subnet_id']
try:
subnet = api.neutron.subnet_get(self.request, subnet_id)
except Exception:
subnet = []
msg = _('Unable to retrieve subnet details.')
exceptions.handle(self.request, msg,
redirect=self.get_redirect_url())
else:
if subnet.ip_version == 6:
ipv6_modes = utils.get_ipv6_modes_menu_from_attrs(
subnet.ipv6_ra_mode, subnet.ipv6_address_mode)
subnet.ipv6_modes_desc = utils.IPV6_MODE_MAP.get(ipv6_modes)
# if ('subnetpool_id' in subnet and
# subnet.subnetpool_id and
# api.neutron.is_extension_supported(self.request,
# 'subnet_allocation')):
# subnetpool = api.neutron.subnetpool_get(self.request,
# subnet.subnetpool_id)
# subnet.subnetpool_name = subnetpool.name
The commented code snippet seems to be the problem. It tries to get
some information about the subnetpool. However, when a subnet uses
IPv6 prefix delegation this is automatically setted when creating de
subnet and if we try to read information about a subnetpool called
"prefix_delegation" we get nothing (empty).
So, as showed, if I comment that code snippet the web interface
succedds and show the subnet details.
I think it is necessary to correct something with this part of the
code.
Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1702466/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list