-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello users, Fedora 15 (and later) uses systemd as init-replacement. Currently, I'm building a fedora package for syslog-ng version 3.2.x. It is based on a git-snapshot dated April 24th. Is there a way to signal syslog-ng to reload it's configuration other than HUPing its pid? The documentation of systemd[1] says: ExecReload= should be specified for all services supporting reload. It is highly recommended to add code here that synchronously reloads the configuration file here (i.e. /bin/kill -HUP $MAINPID is usually a poor choice, due to its asynchronous nature). Omit this option if your service does not support reloading. I would highly appreciate not to maintain a pidfile. Newer linux kernels support so called cgroups. Those can be used to group processes. Systemd creates a cgroup for each service and starts in our case syslog-ng in this cgroup. When no process runs in syslog-ng cgroup, the process exited and must be restarted. systemd takes care of this. Again, is there any other way to signal syslog-ng to reload its config? Thanks, Matthias [1] https://fedoraproject.org/wiki/Systemd_Packaging_Draft#Writing_unit_files -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNuSg1AAoJEOnz8qQwcaIWb6oIAKMjeWwi5C/qZFeWgSL0/X5Y lsMjjWQ/YvhdgjHxNLEHFpTsJT6nrFo1akLN9nL4I8j23vekEgtDrWKAeOk/A+S9 LVUmgcGYnXJC3Oshu2Xg8MLcBQIIrXVrboTeG5GHGBG3gWmRuzL0yH9PjSKbNcd0 PtHSxqEBwhHN9vOc59a5UvclElGgmSzqmYdS5Qm84fStii+j7GNwkqRQvoEGrPlw RrOSFsIPGStXnxk+SzRn8JCKrk7ueZM7l8QoJPIfghdumFqyjPhZRd2BQUlorr6z J3u3GEpXaIOyj+qyix+KTTofjiJh/TC4/SVnqmNTQgsqKLNy1hDCWHXz2X1v7TY= =M50d -----END PGP SIGNATURE-----
Matthias Runge <mrunge@matthias-runge.de> writes:
It is based on a git-snapshot dated April 24th. Is there a way to signal syslog-ng to reload it's configuration other than HUPing its pid?
To the best of my knowledge: no, there is not (yet). One way to remedy this would be to enhance syslog-ng-ctl so it can signal (and wait for) configuration reload. I'm not sure how much work that would be, but my gut feeling is that it would be reasonably easy and straightforward to do. I'll gladly review patches, if you feel adventurous ;) -- |8]
On Thu, 2011-04-28 at 10:41 +0200, Matthias Runge wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello users,
Fedora 15 (and later) uses systemd as init-replacement. Currently, I'm building a fedora package for syslog-ng version 3.2.x.
It is based on a git-snapshot dated April 24th. Is there a way to signal syslog-ng to reload it's configuration other than HUPing its pid?
The documentation of systemd[1] says:
ExecReload= should be specified for all services supporting reload. It is highly recommended to add code here that synchronously reloads the configuration file here (i.e. /bin/kill -HUP $MAINPID is usually a poor choice, due to its asynchronous nature). Omit this option if your service does not support reloading.
I would highly appreciate not to maintain a pidfile. Newer linux kernels support so called cgroups. Those can be used to group processes. Systemd creates a cgroup for each service and starts in our case syslog-ng in this cgroup. When no process runs in syslog-ng cgroup, the process exited and must be restarted. systemd takes care of this.
Again, is there any other way to signal syslog-ng to reload its config?
I've just pushed the following patch to the just-opened syslog-ng 3.4 repository. It should apply quite cleanly to older releases as well, but I've just announced a feature-freeze for 3.3, therefore I don't want to push it there. NOTE: this doesn't wait until syslog-ng finishes, only initiates a reload. It meets your request to avoid the use of PID files, but still, even better would be to wait and report back with the result, which is not impossible, but much more difficult to do. commit 48cf69a28f5aaf9c3397cd0dc5e3f9b66a24683e Author: Balazs Scheidler <bazsi@balabit.hu> Date: Sat Apr 30 22:45:37 2011 +0200 syslog-ng-ctl: add command to "reload" syslog-ng This patch adds a "reload" subcommand to syslog-ng-ctl which initiates a reload without a SIGHUP. Requested-By: Matthias Runge <mrunge@matthias-runge.de> Signed-off-by: Balazs Scheidler <bazsi@balabit.hu> -- Bazsi
participants (3)
-
Balazs Scheidler
-
Gergely Nagy
-
Matthias Runge