network/tests
Gris Ge c98c17a236 Fix problem when switch provider from initscript to nm
Problem:

After `tests_bridge_initscripts.yml` passed, the `tests_bridge_nm.yml`
will fail with NetworkManager 1.18.

Root cause:

 1. The `absent` and `down` action of initscript provider will not
    remove the bridge interface which fail the assertion in
    `tests_bridge_nm.yml`.
 2. In initscript mode, network role will create ifcfg file with
    `NM_CONTROLLED=no` instructing NetworkManager to mark the bridge as
    unmanaged. The follow up `down` and `absent` action of initscript
    provider will not change the NetworkManager's understanding on
    unmanaged state of this interface.

Fixes:
 1. We cannot change existing behaviour of initscript on not deleting
    interface in `down` and `absent` action. So we change the test
    function `tests/playbooks/down_profile.yml` to delete the interface
    manually via `ip link del <ifname>` command.

 2. Use `NM.Client.reload_connections_async()` to reload the
    configuration for nm provider on NetworkManager 1.18.

Previous test infrastructure is running each test file in a brand new VM
or container which cause this problem not been found before.

Dedicate test case `tests/tests_switch_provider.yml` included.

Signed-off-by: Gris Ge <fge@redhat.com>
2022-01-28 17:47:13 +01:00
..
files Add support for domain-suffix-match 802.1x option 2020-05-04 13:01:41 +02:00
integration fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
playbooks Fix problem when switch provider from initscript to nm 2022-01-28 17:47:13 +01:00
roles/linux-system-roles.network Modularize role 2018-08-15 10:04:47 +02:00
tasks add support for ansible-core 2.11 ansible-lint, ansible-test 2021-10-11 12:03:00 -06:00
unit Support routing tables in static routes 2022-01-27 18:18:47 +01:00
.gitignore Move tests to /tests directory and rename to new naming scheme 2018-05-16 19:48:23 +02:00
covstats fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
ensure_provider_tests.py Fix problem when switch provider from initscript to nm 2022-01-28 17:47:13 +01:00
get_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
get_coverage.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
get_total_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
git-post-commit.sh fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
git-pre-commit.sh fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
merge_coverage.sh fix most ansible-test issues, suppress the rest 2021-04-09 19:57:55 +02:00
module_utils Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
modules Integration tests: Fix coverage collection 2020-04-15 22:12:22 +02:00
tests_802_1x_nm.yml should not have removed epel setup from 802 tests 2021-07-29 00:40:40 +08:00
tests_802_1x_updated_nm.yml should not have removed epel setup from 802 tests 2021-07-29 00:40:40 +08:00
tests_auto_gateway_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_auto_gateway_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_bond_deprecated_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_bond_deprecated_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_bond_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_bond_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_bridge_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_bridge_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_change_indication_on_repeat_run.yml nm: Fix the incorrect change indication for dns option 2021-07-05 20:15:57 +08:00
tests_default.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_default_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_default_nm.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_dummy_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_eth_dns_support_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_eth_pci_address_match_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethernet_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_ethernet_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_coalesce_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_ethtool_coalesce_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_features_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_ethtool_features_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ethtool_ring_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_ethtool_ring_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_helpers_and_asserts.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_integration_pytest.yml test: Fix EL6 repo 2020-12-22 08:14:39 +08:00
tests_ipv6_disabled_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_ipv6_dns_search_nm.yml Set DNS search setting only for enabled IP families 2021-12-21 09:18:38 +01:00
tests_ipv6_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_ipv6_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_provider_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_reapply_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_regression_nm.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_route_table_nm.yml Support routing tables in static routes 2022-01-27 18:18:47 +01:00
tests_states_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_states_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_switch_provider.yml Fix problem when switch provider from initscript to nm 2022-01-28 17:47:13 +01:00
tests_team_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_team_plugin_installation_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_unit.yml Cleaning up ansible-lint errors except '106', '303' and '403' 2021-04-15 20:53:53 +02:00
tests_vlan_mtu_initscripts.yml Disable initscripts tests in rhel-9 2021-07-29 16:44:44 -04:00
tests_vlan_mtu_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_plugin_installation_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_wpa3_owe_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00
tests_wireless_wpa3_sae_nm.yml fix ensure_provider_tests.py; fix generated tests; add check to CI 2021-10-19 20:21:03 +02:00