[OVN] Correctly set dns_server in dhcpv4/v6 options
When ovn/dns_servers consist of IPv6 dns nameservers,
it was getting added to IPv4 dhcp options also, and due to
this an invalid nameserver(last 4 octets of an IPv6 address)
is set in the instances.
This patch filters IPv4/IPv6 dns nameservers and set
dhcpv4/dhcpv6 options accordingly.
Also when dns_nameservers are not set for IPv6 subnets,
get those from ovn/dns_servers config or system nameservers
just like it's done with the IPv4 subnets. Updated
get_system_dns_resolvers to pick both IPv4/IPv6 valid
ips, this also requires bump of oslo.utils minimum version
to 4.8.0 to use strict option for IPv4[1].
Additionally fix some unit tests which were setting IPv4 dns
nameservers on the IPv6 subnets, this is not allowed with api.
[Stable Only] Since Neutron stable policy do not allow bumping
of minimum version of a requirement in stable releases, so doing
a partial backport by not backporting requirements.txt changes and
updated get_system_dns_resolvers to work with older version of
oslo.utils.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/824022 /opendev. org/openstack/ neutron/ commit/ 4b89ad64038eb23 01730494c312551 74e2da5597
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/wallaby
commit 4b89ad64038eb23 01730494c312551 74e2da5597
Author: yatinkarel <email address hidden>
Date: Thu Dec 23 21:22:35 2021 +0530
[OVN] Correctly set dns_server in dhcpv4/v6 options
When ovn/dns_servers consist of IPv6 dns nameservers,
it was getting added to IPv4 dhcp options also, and due to
this an invalid nameserver(last 4 octets of an IPv6 address)
is set in the instances.
This patch filters IPv4/IPv6 dns nameservers and set
dhcpv4/dhcpv6 options accordingly.
Also when dns_nameservers are not set for IPv6 subnets, system_ dns_resolvers to pick both IPv4/IPv6 valid
get those from ovn/dns_servers config or system nameservers
just like it's done with the IPv4 subnets. Updated
get_
ips, this also requires bump of oslo.utils minimum version
to 4.8.0 to use strict option for IPv4[1].
Additionally fix some unit tests which were setting IPv4 dns
nameservers on the IPv6 subnets, this is not allowed with api.
[1] https:/ /github. com/openstack/ oslo.utils/ commit/ 3288539
Conflicts: constraints. txt nts.txt
lower-
requireme
[Stable Only] Since Neutron stable policy do not allow bumping dns_resolvers to work with older version of
of minimum version of a requirement in stable releases, so doing
a partial backport by not backporting requirements.txt changes and
updated get_system_
oslo.utils.
Depends-On: https:/ /review. opendev. org/c/openstack /neutron- tempest- plugin/ +/826647 2e43a8c6c266ed9 7ca85fcc13d b69c1b961eecef9 57314faf85)
Closes-Bug: #1951816
Change-Id: I9f914e72120107
(cherry picked from commit 4a06685098cc2e9