From 46ccf006ffde6c341dbb443d5a22fa1e036402da Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 9 Feb 2022 15:30:34 -0500 Subject: [PATCH] ipatests: Remove certmonger tracking before uninstall in cert tests There is some contention between certmonger starting during the uninstallation process in order to stop the tracking and activity going on within certmonger helpers. As near as I can tell certmonger is not running, then IPA is stopped in order to uninstall, then certmonger is started to stop the tracking. certmonger checks cert status on startup but since IPA isn't running it can't get a host ticket. During this time any request over DBus may time out, causing a test to fail when we're just trying to clean up. https://pagure.io/freeipa/issue/8506 Signed-off-by: Rob Crittenden Reviewed-By: Florence Blanc-Renaud --- ipatests/test_integration/test_ipa_cert_fix.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ipatests/test_integration/test_ipa_cert_fix.py b/ipatests/test_integration/test_ipa_cert_fix.py index 5b56054b4..bb03d4309 100644 --- a/ipatests/test_integration/test_ipa_cert_fix.py +++ b/ipatests/test_integration/test_ipa_cert_fix.py @@ -118,6 +118,13 @@ def expire_cert_critical(): yield _expire_cert_critical host = hosts.pop('host') + # Prior to uninstall remove all the cert tracking to prevent + # errors from certmonger trying to check the status of certs + # that don't matter because we are uninstalling. + host.run_command(['systemctl', 'stop', 'certmonger']) + host.run_command( + ['rm', '-f', paths.CERTMONGER_REQUESTS_DIR + '/*'] + ) tasks.uninstall_master(host) tasks.move_date(host, 'start', '-3Years-1day')