TestOVNMechanismDriver some ipv6 tests fails if host has ipv6 dns_names configured

Bug #2056778 reported by Arnau Verdaguer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Arnau Verdaguer

Bug Description

If host where tests are executed has ipv6 dns_servers configured on /etc/resolv.conf two test fails.
The tests are:
- neutron.tests.unit.plugins.ml2.drivers.ovn.mech_driver.test_mech_driver.TestOVNMechanismDriver.test_update_subnet_dhcp_options_in_ovn_ipv6_not_change
- neutron.tests.unit.plugins.ml2.drivers.ovn.mech_driver.test_mech_driver.TestOVNMechanismDriver.test_enable_subnet_dhcp_options_in_ovn_ipv6

This is due to not patching the ovn_utils.get_system_dns_resolvers which ends up looking at host for dns_servers.
This doesn't happen on ipv4 since on the setup the ipv4 dns_servers are set using ovn_conf.cfg.CONF.set_override.

Changed in neutron:
assignee: nobody → Arnau Verdaguer (averdagu)
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/+/912475

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/+/912475
Committed: https://opendev.org/openstack/neutron/commit/2a196fefd4a8a0c15176fe87d88b05d1690ab5fa
Submitter: "Zuul (22348)"
Branch: master

commit 2a196fefd4a8a0c15176fe87d88b05d1690ab5fa
Author: Arnau Verdaguer <email address hidden>
Date: Mon Mar 11 17:30:11 2024 +0100

    Fix TestOVNMechanismDriver ipv6 tests

    - test_update_subnet_dhcp_options_in_ovn_ipv6_not_change
    - test_enable_subnet_dhcp_options_in_ovn_ipv6
    This tests will fail if host where unit tests has ipv6 dns_servers
    configured. This patch mocks get_system_dns_servers to avoid tests
    to look at the host configuration.

    Closes-Bug: #2056778
    Change-Id: I2e703ab4b63c90d7a14f0dc41d37b0a98163bce0

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

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/912072
Committed: https://opendev.org/openstack/neutron/commit/8db03d65e851033d3830a6b502c839c03111f16d
Submitter: "Zuul (22348)"
Branch: stable/2023.2

commit 8db03d65e851033d3830a6b502c839c03111f16d
Author: Arnau Verdaguer <email address hidden>
Date: Mon Mar 11 17:30:11 2024 +0100

    Fix TestOVNMechanismDriver ipv6 tests

    - test_update_subnet_dhcp_options_in_ovn_ipv6_not_change
    - test_enable_subnet_dhcp_options_in_ovn_ipv6
    This tests will fail if host where unit tests has ipv6 dns_servers
    configured. This patch mocks get_system_dns_servers to avoid tests
    to look at the host configuration.

    Closes-Bug: #2056778
    Change-Id: I2e703ab4b63c90d7a14f0dc41d37b0a98163bce0
    (cherry picked from commit 2a196fefd4a8a0c15176fe87d88b05d1690ab5fa)

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/912073
Committed: https://opendev.org/openstack/neutron/commit/a8bf8cdaa6d80d77d80b3af3a8dad18178f6fb76
Submitter: "Zuul (22348)"
Branch: stable/2023.1

commit a8bf8cdaa6d80d77d80b3af3a8dad18178f6fb76
Author: Arnau Verdaguer <email address hidden>
Date: Mon Mar 11 17:30:11 2024 +0100

    Fix TestOVNMechanismDriver ipv6 tests

    - test_update_subnet_dhcp_options_in_ovn_ipv6_not_change
    - test_enable_subnet_dhcp_options_in_ovn_ipv6
    This tests will fail if host where unit tests has ipv6 dns_servers
    configured. This patch mocks get_system_dns_servers to avoid tests
    to look at the host configuration.

    Closes-Bug: #2056778
    Change-Id: I2e703ab4b63c90d7a14f0dc41d37b0a98163bce0
    (cherry picked from commit 2a196fefd4a8a0c15176fe87d88b05d1690ab5fa)

Changed in neutron:
importance: Undecided → Medium
tags: added: ovn
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 24.0.0.0rc1

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

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

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

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

Reviewed: https://review.opendev.org/c/openstack/neutron/+/915523
Committed: https://opendev.org/openstack/neutron/commit/de9e3e8c9bb78feb71c47f886f8d785f55568b6d
Submitter: "Zuul (22348)"
Branch: stable/zed

commit de9e3e8c9bb78feb71c47f886f8d785f55568b6d
Author: Arnau Verdaguer <email address hidden>
Date: Mon Mar 11 17:30:11 2024 +0100

    Fix TestOVNMechanismDriver ipv6 tests

    - test_update_subnet_dhcp_options_in_ovn_ipv6_not_change
    - test_enable_subnet_dhcp_options_in_ovn_ipv6
    This tests will fail if host where unit tests has ipv6 dns_servers
    configured. This patch mocks get_system_dns_servers to avoid tests
    to look at the host configuration.

    Closes-Bug: #2056778
    Change-Id: I2e703ab4b63c90d7a14f0dc41d37b0a98163bce0
    (cherry picked from commit 2a196fefd4a8a0c15176fe87d88b05d1690ab5fa)
    (cherry picked from commit a8bf8cdaa6d80d77d80b3af3a8dad18178f6fb76)

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

This issue was fixed in the openstack/neutron 21.2.1 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.