Subnet details page fails when a subnet uses IPv6 with prefix delegation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Medium
|
Akihiro Motoki | ||
horizon (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Package: openstack-dashboard
Description: Ubuntu 16.04.2 LTS
Release: 16.04
openstack-
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-
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:
| cidr | 2001:DB8:
| created_at | 2016-09-12T13:01:15 |
| description | |
| dns_nameservers | 2001:DB8:
| enable_dhcp | True |
| gateway_ip | 2001:DB8:
| host_routes | |
| id | 129bd534-
| ip_version | 6 |
| ipv6_address_mode | dhcpv6-stateless |
| ipv6_ra_mode | dhcpv6-stateless |
| name | nti-subnet-ipv6 |
| network_id | d204d9a2-
| project_id | 769822d4bf984cf
| subnetpool_id | prefix_delegation |
| updated_at | 2017-05-31T18:59:50 |
+------
Trying to find the problem, I found the file openstack_
class DetailView(
tab_group_class = project_
template_name = 'horizon/
page_title = "{{ subnet.
@memoized.
def get_data(self):
subnet_id = self.kwargs[
try:
subnet = api.neutron.
except Exception:
subnet = []
msg = _('Unable to retrieve subnet details.')
else:
if subnet.ip_version == 6:
# if ('subnetpool_id' in subnet and
# subnet.
# api.neutron.
# 'subnet_
# subnetpool = api.neutron.
# subnet.
# subnet.
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!
Changed in horizon (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in horizon (Ubuntu): | |
status: | Triaged → Fix Released |
Yes, we need to add a special handling when subnetpool_id is 'prefix_ delegation' . It is a special subnet pool and we cannot retrieve such subnetpool via the neutron API.