all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 62802@debbugs.gnu.org
Subject: [bug#62802] [PATCH 0/4] Add reload action to syslog service.
Date: Fri, 21 Apr 2023 08:50:58 -0400	[thread overview]
Message-ID: <87354txutp.fsf@gmail.com> (raw)
In-Reply-To: <87v8hqshmz.fsf_-_@gnu.org> ("Ludovic Courtès"'s message of "Thu, 20 Apr 2023 17:22:28 +0200")

Hello,

Ludovic Courtès <ludo@gnu.org> writes:

> 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’.

Right; although now if you aren't sure what is used you can 'reload' it,
eh :-).

> 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.

OK!

> 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).

Wouldn't that be equivalent to restarting the service?  I wasn't aware
of the new hook facility, I'll have to read on it, thanks!

> 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!

Interesting idea... although it'd only be compatible with Linux and I
dislike writing special cases in services (or anywhere if I can help
it).

-- 
Thanks,
Maxim




  reply	other threads:[~2023-04-21 12:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13  1:15 [bug#62802] [PATCH 0/4] Add reload action to syslog service Maxim Cournoyer
2023-04-13  1:24 ` [bug#62802] [PATCH 1/4] services: syslog: Move configuration to /etc/syslog.conf Maxim Cournoyer
2023-04-13  1:24   ` [bug#62802] [PATCH 2/4] services: syslog: Add a reload action Maxim Cournoyer
2023-04-13  1:24   ` [bug#62802] [PATCH 3/4] services/syslog: Strip leading white space indent in syslog.conf Maxim Cournoyer
2023-04-13  1:24   ` [bug#62802] [PATCH 4/4] services: syslog: Log auth.info to /var/log/secure in default configuration Maxim Cournoyer
2023-04-20 15:26     ` [bug#62802] [PATCH 0/4] Add reload action to syslog service Ludovic Courtès
2023-04-21 13:36       ` bug#62802: " Maxim Cournoyer
2023-04-20 15:22   ` [bug#62802] " Ludovic Courtès
2023-04-21 12:50     ` Maxim Cournoyer [this message]
2023-04-21 14:03       ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87354txutp.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=62802@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.