pschiffe / ipa-log-config

Tool for log forwarding configuration on IPA servers and clients
https://www.freeipa.org/page/Centralized_Logging
GNU General Public License v2.0
32 stars 14 forks source link

systemctl: reload is not applicable for unit auditd.service #15

Closed LnxGnome closed 4 years ago

LnxGnome commented 5 years ago

CentOS 7.6.1810

# ./ipa_log_config.py --target syslog
Setting SSSD debug level to 2
Condrestarting SSSD
Enabling audisp syslog plugin
Reloading auditd
Failed to reload auditd.service: Job type reload is not applicable for unit auditd.service.
See system logs and 'systemctl status auditd.service' for details.
Failed to execute external command: Failed to reload auditd

Workaround: remove self._restart from auditd portion of the code.

+++ ipa_log_config-new.py   2019-04-11 07:05:16.489209718 -0400
@@ -123,7 +123,7 @@
                 self._AUDITD_SYSLOG_CONF]) != 0:
             raise ExternalCommandError(
                 'Failed to run sed on file: ' + self._AUDITD_SYSLOG_CONF)
-        self._restart()
+        # self._restart()

     def revert(self):
         print 'Disabling audisp syslog plugin'
@@ -131,7 +131,7 @@
                 self._AUDITD_SYSLOG_CONF]) != 0:
             raise ExternalCommandError(
                 'Failed to run sed on file: ' + self._AUDITD_SYSLOG_CONF)
-        self._restart()
+        # self._restart()

 class RequirementError(Exception):
pschiffe commented 4 years ago

Thank you for the report, fixed in https://github.com/pschiffe/ipa-log-config/commit/1cb975d0e0813e935061fb968e277604ceb02a79