From: Csepp <raingloom@riseup.net>
To: Adam Faiz <adam.faiz@disroot.org>
Cc: "Ludovic Courtès" <ludo@gnu.org>, guix-devel@gnu.org
Subject: Re: The 🐑 Shepherd gets a service collection
Date: Fri, 17 Mar 2023 10:52:36 +0100 [thread overview]
Message-ID: <871qln4s0t.fsf@riseup.net> (raw)
In-Reply-To: <051c5314-2880-5520-fac5-628eb6eb6227@disroot.org>
Adam Faiz <adam.faiz@disroot.org> writes:
> On 3/16/23 22:14, Ludovic Courtès wrote:
>> The main limitation of mcron for such thing is that it’s entirely
>> static: it reads a list of job specs upfront and then goes on to
>> schedule them. There’s no communication protocol to talk to it and
>> add/remove jobs on the fly, which is what ‘at’ would need.
> Would it be easier to add dynamic job spec support to mcron than adding a new command scheduler?
Adding timers to Shepherd means Shepherd services can depend on timers
and vice-versa.
But maybe Shepherd could still reuse mcron code internally.
>>> Regarding syslogd, I think a better approach is to tell the services to send their output to stdout and stderror,
>>> so that logs don't depend on a separate logging service in the first place.
>> Yes, but:
>> 1. Some daemons include syslog support even today, sometimes
>> optional,
>> sometimes mandatory.
>> 2. Syslog is a bit more structured than just stdout/stderr
>> output:
>> there are facilities and levels, for instance—see syslog(3);
>> syslogd provides interesting filtering capabilities.
>>
> Thanks, it looks like syslog is still important for structured logs.
>
> Are there issues of logs sent to syslog being lost even when the syslogd service is specified as a requirement of services that use it?
> If not, I think it's not necessary to add a syslogd implementation to the shepherd.
> >> Per-service logging is already implemented in the Shepherd, but
> could be streamlined to have a default logs directory:
>>> https://skarnet.org/software/s6/s6-log.html#loggingchain
>> Interesting read, thanks!
>> Regarding the default logs directory, there’s /var/log already, or
>> did
>> you mean something else?
> I do mean /var/log, I felt like #:log-file in make-forkexec-constructor could be improved.
> Rather than always having to specify the absolute log file path,
> #:log-file could just be set as #t and would then default to
> /var/log/$canonical-name of the service.
That is problematic on flash storage and read-only storage.
Syslog has the advantage of working very nicely in memory only.
Also the structure is very nice, you get to see every event on the
system in a chronological order. You don't get that with log files.
Honestly /var/log should be redirectable to syslog.
next prev parent reply other threads:[~2023-03-17 10:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-13 23:39 The 🐑 Shepherd gets a service collection Adam Faiz
2023-03-16 14:14 ` Ludovic Courtès
2023-03-17 6:55 ` Adam Faiz
2023-03-17 9:52 ` Csepp [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-03-13 16:11 Ludovic Courtès
2023-03-13 19:59 ` indieterminacy
2023-03-14 12:20 ` Maxim Cournoyer
2023-03-16 14:16 ` Ludovic Courtès
2023-03-17 16:28 ` Maxim Cournoyer
2023-03-14 14:43 ` Efraim Flashner
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qln4s0t.fsf@riseup.net \
--to=raingloom@riseup.net \
--cc=adam.faiz@disroot.org \
--cc=guix-devel@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).