From 14bd0b177e9c180b5f894f1ab7692f0382f266d1 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 22 Aug 2023 00:24:47 -0700 Subject: [PATCH] FreeIPA replica test: decommission the replica A new FreeIPA update adds a check which causes a failure when we try to decommission the original server with the replica still alive. Let's see if decommissioning the replica helps. Signed-off-by: Adam Williamson --- tests/realmd_join_sssd.pm | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/tests/realmd_join_sssd.pm b/tests/realmd_join_sssd.pm index f79c121d..ea2d042a 100644 --- a/tests/realmd_join_sssd.pm +++ b/tests/realmd_join_sssd.pm @@ -58,19 +58,35 @@ sub run { assert_script_run "systemctl enable ipa.service"; assert_script_run "systemctl start ipa.service", 300; + # set sssd debugging level higher (useful for debugging failures) + # optional as it's not really part of the test + script_run "dnf -y install sssd-tools", 220; + script_run "sss_debuglevel 9"; + # report that we're ready to go mutex_create('domain_replica_ready'); # wait for the client test wait_for_children; + + # uninstall ourselves (copied from domain controller test) + assert_script_run 'systemctl stop ipa.service', 120; + # check server is stopped + assert_script_run '! systemctl is-active ipa.service'; + # decommission the server + assert_script_run 'ipa-server-install -U --uninstall', 300; + # try and un-garble the screen that the above sometimes garbles + # ...we may be on tty1 or tty3 now, so flip between them + send_key "ctrl-alt-f1"; + send_key "ctrl-alt-f3"; } else { assert_script_run "echo '${admin_pw}' | realm join --user=${admin_user} ${server}", 300; + # set sssd debugging level higher (useful for debugging failures) + # optional as it's not really part of the test + script_run "dnf -y install sssd-tools", 220; + script_run "sss_debuglevel 9"; } - # set sssd debugging level higher (useful for debugging failures) - # optional as it's not really part of the test - script_run "dnf -y install sssd-tools", 220; - script_run "sss_debuglevel 9"; # if upgrade test, report that we're enrolled mutex_create('client_enrolled') if get_var("UPGRADE"); # if this is an upgrade test, wait for server to be upgraded before