From ee6472cee20ff99d16cde1a97c3dd5167b7cd893 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 7 Apr 2022 09:41:48 +0300 Subject: [PATCH] ipatests: collect samba logs when setting up trust to AD In many cases it is impossible to investigate test failures of environments where a trust to Active Directory is establishe without Samba logs. Collect Samba logs by default and make sure Samba is configured with higher log levels if we are going to configure IPA to setup trust to Active Directory. Signed-off-by: Alexander Bokovoy Reviewed-By: Florence Blanc-Renaud --- ipatests/pytest_ipa/integration/__init__.py | 1 + ipatests/pytest_ipa/integration/tasks.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ipatests/pytest_ipa/integration/__init__.py b/ipatests/pytest_ipa/integration/__init__.py index 81310447c..34b6ef0fb 100644 --- a/ipatests/pytest_ipa/integration/__init__.py +++ b/ipatests/pytest_ipa/integration/__init__.py @@ -99,6 +99,7 @@ CLASS_LOGFILES = [ paths.NETWORK_MANAGER_CONFIG_DIR, paths.SYSTEMD_RESOLVED_CONF, paths.SYSTEMD_RESOLVED_CONF_DIR, + '/var/log/samba', ] diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 99b907c64..5cbfa4e15 100755 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -594,6 +594,7 @@ def install_adtrust(host): '-a', host.config.admin_password, '--add-sids']) + host.run_command(['net', 'conf', 'setparm', 'global', 'log level', '10']) Firewall(host).enable_service("freeipa-trust") # Restart named because it lost connection to dirsrv