From c53fc08a70679b181b0eff6422f199a51d527e67 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Tue, 9 Oct 2018 15:41:44 +0200 Subject: [PATCH 64/66] SYSTEMD: Re-read KCM configuration on systemctl restart kcm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related: https://pagure.io/SSSD/sssd/issue/3862 Uses the sssd command together with the --genconf-section=kcm option to refresh the kcm configuration when the sssd-kcm systemd service is restarted. This allows the administrator to e.g. just drop a snippet to /etc/sssd.conf.d/ or create the [kcm] section directly in the main sssd config file, then just restart the sssd-kcm service for the changes to apply. Reviewed-by: Michal Židek --- src/man/sssd-kcm.8.xml | 33 ++++++++++++++++++++++++++++ src/sysv/systemd/sssd-kcm.service.in | 1 + 2 files changed, 34 insertions(+) diff --git a/src/man/sssd-kcm.8.xml b/src/man/sssd-kcm.8.xml index ec27aa57b..fff8b0a16 100644 --- a/src/man/sssd-kcm.8.xml +++ b/src/man/sssd-kcm.8.xml @@ -127,6 +127,39 @@ systemctl enable sssd-kcm.socket + + OBTAINING DEBUG LOGS + + The sssd-kcm service is typically socket-activated + + systemd + 1 + . To generate debug logs, add the following + either to the /etc/sssd/sssd.conf + file directly or as a configuration snippet to + /etc/sssd/conf.d/ directory: + +[kcm] +debug_level = 10 + + Then, restart the sssd-kcm service: + +systemctl restart sssd-kcm.service + + Finally, run whatever use-case doesn't work for you. The KCM + logs will be generated at + /var/log/sssd/sssd_kcm.log. It is + recommended to disable the debug logs when you no longer need + the debugging to be enabled as the sssd-kcm service can generate + quite a large amount of debugging information. + + + Please note that configuration snippets are, at the moment, + only processed if the main configuration file at + /etc/sssd/sssd.conf exists at all. + + + CONFIGURATION OPTIONS diff --git a/src/sysv/systemd/sssd-kcm.service.in b/src/sysv/systemd/sssd-kcm.service.in index 8d689bfd7..5c82bee7d 100644 --- a/src/sysv/systemd/sssd-kcm.service.in +++ b/src/sysv/systemd/sssd-kcm.service.in @@ -9,4 +9,5 @@ Also=sssd-kcm.socket [Service] Environment=DEBUG_LOGGER=--logger=files +ExecStartPre=-@sbindir@/sssd --genconf-section=kcm ExecStart=@libexecdir@/sssd/sssd_kcm --uid 0 --gid 0 ${DEBUG_LOGGER} -- 2.19.1