[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#62802] [PATCH 0/4] Add reload action to syslog service.
From: |
Ludovic Courtès |
Subject: |
[bug#62802] [PATCH 0/4] Add reload action to syslog service. |
Date: |
Thu, 20 Apr 2023 17:22:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> Having the configuration live at a static location makes it possible to
> hot-reload it.
>
> * gnu/services/base.scm (syslog.conf): New variable.
> (syslog-etc, syslog-shepherd-service): New procedures.
> (syslog-service-type): Rewrite using the above new variable and procedures,
> extending etc-service-type with its configuration file.
I’m really not a fan of static configuration file names: you can never
be sure what config the service is using—compare this with the
unambiguous ‘--config=/gnu/store/…example.conf’.
Unfortunately there’s often no other option if we want to support live
reconfiguration—there’s only so much a signal can convey.
So I guess it’s a “weak accept” from me, because live reload is useful.
With the Shepherd in ‘master’, there’s a hook to change a service’s
“running value” so it should be possible to stop the previous process,
start a new one, and update the service’s running value (which is not
equivalent to SIGHUP, but maybe good enough for some cases).
A simpler approach might be run the service in a container with
/gnu/store/…conf mapped to a fixed location, and somehow update that
mapping as we go. Food for thought!
Ludo’.