Subject: bug#62163: Suppress logging shepherd evaluation in mcron.log

From: Ludovic Courtès <[email-masked]>
Date: Fri, 31 Mar 2023 14:18:34 +0200

Hi,

Bruno Victal <[email-masked]> skribis:

> On 2023-03-30 11:22, Ludovic Courtès wrote:

[...]

>>> It queries shepherd to see if a service is running and sends a restart if required.
>> 
>> Isn’t that what #:respawn? #t is supposed to do?  :-)
>> 
>> If you find that #:respawn? doesn’t work, then we should fix it.
>
> Oh, I should have explained better here.
> Re-spawn works, it's the (daemon) service that might misbehave/go unresponsive without crashing,
> i.e. HTTP backend stops responding to API requests but the server is still up.
> The job performs a "health-check" and restarts it if it doesn't get the appropriate response.

OK.  It still means that the service in question is kinda broken, right?

> A concrete situation where this could be of use is for logs.guix that occasionally stops
> recording.

Oh you mean ‘goggles-bot’?  Yeah I wonder why it occasionally goes
wrong, but really I think Someone™ should debug it (it’s a small script
in maintenance.git).

>> You can send messages to the bitbucket with:
>> 
>>   (parameterize ((shepherd-message-port (%make-void-port "w0")))
>>     …)
>
> Thanks!
> I'm still curious as to exactly what/which lines cause shepherd to output the lines.

The “Evaluating” line is emitted by shepherd, logged, and sent to
clients (for instance when you do ‘herd eval root '(+ 2 3)'’).

(gnu services herd) provides a client that echoes those messages to
‘shepherd-message-port’.

Does that make sense?

Ludo’.