From 855b654cb4b098d10c4d464fb1b116347af5e3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Harald=20Jens=C3=A5s?= Date: Tue, 7 Apr 2020 15:30:18 +0200 Subject: [PATCH] Drop netaddr - use netutils.is_valid_ipv6() Change I8c595830b8c7974c651a9e524b57a6540e4f3d1f added a dependency on netaddr. Ironic did'nt directly depend on netaddr prior to this. This removes the use of netaddr, netutils.is_valid_ipv6() is used instead. Also update the releasenote to clarify that the support for allocating multiple IPv6 addresses fixes provisioning on DHCPv6-stateful networks. Story: 2007315 Task: 39321 Change-Id: I976bf9cee6fd10736f9fc88ca816266651b979c6 --- ironic/common/neutron.py | 4 ++-- .../dhcpv6-stateful-address-count-0f94ac6a55bd9e51.yaml | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ironic/common/neutron.py b/ironic/common/neutron.py index 28cfc73cfe..7182cd3578 100644 --- a/ironic/common/neutron.py +++ b/ironic/common/neutron.py @@ -13,10 +13,10 @@ import copy from keystoneauth1 import loading as ks_loading -import netaddr from neutronclient.common import exceptions as neutron_exceptions from neutronclient.v2_0 import client as clientv20 from oslo_log import log +from oslo_utils import netutils from oslo_utils import uuidutils import retrying @@ -247,7 +247,7 @@ def _add_ip_addresses_for_ipv6_stateful(context, port, client): """ fixed_ips = port['port']['fixed_ips'] if (not fixed_ips - or netaddr.IPAddress(fixed_ips[0]['ip_address']).version != 6): + or not netutils.is_valid_ipv6(fixed_ips[0]['ip_address'])): return subnet = client.show_subnet( diff --git a/releasenotes/notes/dhcpv6-stateful-address-count-0f94ac6a55bd9e51.yaml b/releasenotes/notes/dhcpv6-stateful-address-count-0f94ac6a55bd9e51.yaml index 8267f99d45..8028448fda 100644 --- a/releasenotes/notes/dhcpv6-stateful-address-count-0f94ac6a55bd9e51.yaml +++ b/releasenotes/notes/dhcpv6-stateful-address-count-0f94ac6a55bd9e51.yaml @@ -6,4 +6,9 @@ features: cleaning, rescue or inspection. The new parameter ``[neutron]/dhcpv6_stateful_address_count`` controls the number of addresses to allocate (Default: 4). - +fixes: + - | + The 'no address available' problem seen when network booting on + DHCPv6-stateful networks is fixed with the support for allocating multiple + IPv6 addresses. See `bug: 1861032 + `_.