[OVN] setting a IPv6 address in dns_servers is broken

Bug #1951816 reported by Dr. Jens Harbott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
yatin

Bug Description

When listing an IPv6 address in [ovn]dns_servers, its last four octets are being added to DHCPv4 replies. The expected result is that the address is added to DHCPv6 replies.

description: updated
tags: added: dns ovn
Changed in neutron:
importance: Undecided → Medium
yatin (yatinkarel)
Changed in neutron:
assignee: nobody → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/822843

Changed in neutron:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/822843
Committed: https://opendev.org/openstack/neutron/commit/4a06685098cc2e9b69c1b961eecef957314faf85
Submitter: "Zuul (22348)"
Branch: master

commit 4a06685098cc2e9b69c1b961eecef957314faf85
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,
    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.

    [1] https://github.com/openstack/oslo.utils/commit/3288539

    Closes-Bug: #1951816
    Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/824137

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/824022

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/824137
Committed: https://opendev.org/openstack/neutron/commit/88dfbcc8a943332d6dbe2c0bcb310661908ad1e2
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 88dfbcc8a943332d6dbe2c0bcb310661908ad1e2
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,
    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.

    [1] https://github.com/openstack/oslo.utils/commit/3288539

    Conflicts:
      lower-constraints.txt
      requirements.txt

    [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.

    Closes-Bug: #1951816
    Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d
    (cherry picked from commit 4a06685098cc2e9b69c1b961eecef957314faf85)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/824022
Committed: https://opendev.org/openstack/neutron/commit/4b89ad64038eb2301730494c31255174e2da5597
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 4b89ad64038eb2301730494c31255174e2da5597
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,
    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.

    [1] https://github.com/openstack/oslo.utils/commit/3288539

    Conflicts:
      lower-constraints.txt
      requirements.txt

    [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.

    Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/826647
    Closes-Bug: #1951816
    Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d
    (cherry picked from commit 4a06685098cc2e9b69c1b961eecef957314faf85)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 20.0.0.0rc1

This issue was fixed in the openstack/neutron 20.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.3.0

This issue was fixed in the openstack/neutron 18.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.2.0

This issue was fixed in the openstack/neutron 19.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/838878

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/838879

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/838878
Committed: https://opendev.org/openstack/neutron/commit/6713cdaccd7db0743d17f070c515e994e157b6d8
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 6713cdaccd7db0743d17f070c515e994e157b6d8
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,
    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.

    [1] https://github.com/openstack/oslo.utils/commit/3288539

    Conflicts:
      lower-constraints.txt
      requirements.txt

    [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.

    Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/826647
    Closes-Bug: #1951816
    Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d
    (cherry picked from commit 4a06685098cc2e9b69c1b961eecef957314faf85)
    (cherry picked from commit 4b89ad64038eb2301730494c31255174e2da5597)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/838879
Committed: https://opendev.org/openstack/neutron/commit/6a5aa9b83c367c27cb4ea09e6c1fd211eed76001
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 6a5aa9b83c367c27cb4ea09e6c1fd211eed76001
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,
    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.

    [1] https://github.com/openstack/oslo.utils/commit/3288539

    Conflicts:
      lower-constraints.txt
      requirements.txt

    [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.

    Depends-On: https://review.opendev.org/c/openstack/neutron-tempest-plugin/+/826647
    Closes-Bug: #1951816
    Change-Id: I9f914e721201072e43a8c6c266ed97ca85fcc13d
    (cherry picked from commit 4a06685098cc2e9b69c1b961eecef957314faf85)
    (cherry picked from commit 4b89ad64038eb2301730494c31255174e2da5597)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn train-eol

This issue was fixed in the openstack/networking-ovn train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron ussuri-eol

This issue was fixed in the openstack/neutron ussuri-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron victoria-eom

This issue was fixed in the openstack/neutron victoria-eom release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.