diff --git a/changelog/69728.fixed.md b/changelog/69728.fixed.md new file mode 100644 index 000000000000..ca9a2e1b7240 --- /dev/null +++ b/changelog/69728.fixed.md @@ -0,0 +1 @@ +Fixed the Rocky Linux 9 integration tcp/zeromq CI jobs failing most PR runs: the startup_states and salt_call ownership test fixtures left their extra minions' accepted keys on the shared session master after stopping the minions, so later netapi tests targeting ``*`` matched dead minions (wrong minion lists and 30 second timeouts). The fixtures now delete their minion keys at teardown. diff --git a/tests/pytests/integration/cli/test_salt_call_ownership.py b/tests/pytests/integration/cli/test_salt_call_ownership.py index 175931da6079..8fe529328b80 100644 --- a/tests/pytests/integration/cli/test_salt_call_ownership.py +++ b/tests/pytests/integration/cli/test_salt_call_ownership.py @@ -64,6 +64,10 @@ def non_root_minion(salt_master, salt_factories): ) with factory.started(): yield factory + # The minion process is stopped at this point, but its accepted key stays + # on the shared session master, where later tests that target '*' (the + # netapi integration tests) would match it as a dead minion. Remove it. + salt_master.salt_key_cli().run("-d", factory.id, "-y") @pytest.mark.skipif(shutil.which("sudo") is None, reason="sudo is not available") diff --git a/tests/pytests/integration/minion/test_startup_states.py b/tests/pytests/integration/minion/test_startup_states.py index d8b891b35c42..f76760b0ba21 100644 --- a/tests/pytests/integration/minion/test_startup_states.py +++ b/tests/pytests/integration/minion/test_startup_states.py @@ -29,6 +29,10 @@ def salt_minion_startup_states_empty_string(salt_master, salt_minion_id): ) with factory.started(): yield factory + # The minion process is stopped at this point, but its accepted key stays + # on the shared session master, where later tests that target '*' (the + # netapi integration tests) would match it as a dead minion. Remove it. + salt_master.salt_key_cli().run("-d", factory.id, "-y") @pytest.fixture @@ -43,6 +47,10 @@ def salt_minion_startup_states_highstate(salt_master, salt_minion_id): ) with factory.started(): yield factory + # The minion process is stopped at this point, but its accepted key stays + # on the shared session master, where later tests that target '*' (the + # netapi integration tests) would match it as a dead minion. Remove it. + salt_master.salt_key_cli().run("-d", factory.id, "-y") @pytest.fixture @@ -58,6 +66,10 @@ def salt_minion_startup_states_sls(salt_master, salt_minion_id): ) with factory.started(): yield factory + # The minion process is stopped at this point, but its accepted key stays + # on the shared session master, where later tests that target '*' (the + # netapi integration tests) would match it as a dead minion. Remove it. + salt_master.salt_key_cli().run("-d", factory.id, "-y") @pytest.fixture @@ -73,6 +85,10 @@ def salt_minion_startup_states_top(salt_master, salt_minion_id): ) with factory.started(): yield factory + # The minion process is stopped at this point, but its accepted key stays + # on the shared session master, where later tests that target '*' (the + # netapi integration tests) would match it as a dead minion. Remove it. + salt_master.salt_key_cli().run("-d", factory.id, "-y") def test_startup_states_empty_string(