Skip to content

Commit

Permalink
Tests: Add fixing sssd.conf ownership after realm join.
Browse files Browse the repository at this point in the history
Add journalctl info when service_ctrl call fails.

Reviewed-by: Madhuri Upadhye <[email protected]>
  • Loading branch information
jakub-vavra-cz committed May 7, 2024
1 parent f722738 commit 7bf051e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/tests/multihost/sssd/testlib/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ def service_ctrl(self, action, target_service):
time.sleep(10)
return cmd.returncode
else:
self.multihost.run_command(f'journalctl -xeu {target_service}')
raise SSSDException('Unable to %s %s' % (action,
target_service), 1)

Expand Down Expand Up @@ -508,6 +509,8 @@ def realm_join(self, domainname, admin_password,
self.multihost.run_command("cat /etc/krb5.conf", raiseonerr=False)
self.multihost.run_command("resolvectl dns", raiseonerr=False)
raise SSSDException("Error: %s" % cmd.stderr_text)
self.fix_sssd_conf_perms()
self.service_ctrl("restart", "sssd")
return cmd.stderr_text


Expand Down

0 comments on commit 7bf051e

Please sign in to comment.