From ba3a5152c18f17f91e8deddb3d04a986ac0a616b Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Thu, 16 Mar 2017 12:36:33 -0700 Subject: [PATCH] Improve FreeIPA debug logging a bit Committing without review as this is pretty trivial and I've had it on staging for the last few days without issue. Just gets us somewhat better info for debugging FreeIPA issues. --- lib/installedtest.pm | 3 +++ tests/realmd_join_sssd.pm | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/lib/installedtest.pm b/lib/installedtest.pm index abb43b85..b9773a16 100644 --- a/lib/installedtest.pm +++ b/lib/installedtest.pm @@ -54,6 +54,9 @@ sub post_fail_hook { unless (script_run "tar czvf /tmp/var_log.tar.gz --exclude='lastlog' /var/log") { upload_logs "/tmp/var_log.tar.gz"; } + + # Sometimes useful for diagnosing FreeIPA issues + upload_logs "/etc/nsswitch.conf", failok=>1; } 1; diff --git a/tests/realmd_join_sssd.pm b/tests/realmd_join_sssd.pm index 4229f554..fe7d5756 100644 --- a/tests/realmd_join_sssd.pm +++ b/tests/realmd_join_sssd.pm @@ -17,6 +17,10 @@ sub run { repo_setup(); # do the enrolment assert_script_run "echo 'monkeys123' | realm join --user=admin ipa001.domain.local", 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", 180; + script_run "sss_debuglevel 6"; } sub test_flags {