Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)

  • Done
  • quality assurance status badge
Details
3 participants
  • Ludovic Courtès
  • Maxim Cournoyer
  • Maxime Devos
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal

Debbugs page

M
M
Maxim Cournoyer wrote on 8 Jun 2022 11:57
(name . bug-guix)(address . bug-guix@gnu.org)
87leu7j84f.fsf@gmail.com
Hello Guix,

The following message is shown when reconfiguring Guix System:

Toggle snippet (3 lines)
shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).

It doesn't seem intended for end users to see; at least I have no clue
what it's supposed to tell me :-).

Thanks,

Maxim
L
L
Ludovic Courtès wrote on 10 Jun 2022 14:55
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55857@debbugs.gnu.org)
87o7z0xjxq.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (7 lines)
> The following message is shown when reconfiguring Guix System:
>
> shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
>
> It doesn't seem intended for end users to see; at least I have no clue
> what it's supposed to tell me :-).

The question marks are HORIZONTAL ELLIPSIS not being displayed properly
because ‘guix’ is not running under a UTF-8 locale.

The message is produced by shepherd as a response to an expression that
‘guix system reconfigure’ tells it to evaluate, in (gnu services herd).
And all this happens as part of the live service upgrade mechanism.

Admittedly, this particular message is not something one cares about as
a user, but it seemed safer to print messages shepherd might send during
that operation.

Ludo’.
M
M
Maxim Cournoyer wrote on 14 Jun 2022 09:22
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 55857@debbugs.gnu.org)
87v8t3dxk9.fsf@gmail.com
Hi Ludovic,

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

Toggle quote (22 lines)
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> The following message is shown when reconfiguring Guix System:
>>
>> shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
>>
>> It doesn't seem intended for end users to see; at least I have no clue
>> what it's supposed to tell me :-).
>
> The question marks are HORIZONTAL ELLIPSIS not being displayed properly
> because ‘guix’ is not running under a UTF-8 locale.
>
> The message is produced by shepherd as a response to an expression that
> ‘guix system reconfigure’ tells it to evaluate, in (gnu services herd).
> And all this happens as part of the live service upgrade mechanism.
>
> Admittedly, this particular message is not something one cares about as
> a user, but it seemed safer to print messages shepherd might send during
> that operation.

Perhaps what we need is a proper logging infrastructure? The above
message could be flagged as a 'debug' level message. stdout/stderr
would only get to see the 'info' or higher level messages, the rest
would be logged only to syslog, keeping the user interface clean. I
know such a logging mechanism exists in Guile-Lib, as the (logging
logger) module [0].

What do you think?

Thanks,

Maxim

M
M
Maxime Devos wrote on 14 Jun 2022 09:50
(address . 55857@debbugs.gnu.org)
eff7c022549090ae03e2664e395ee6851019cd6d.camel@telenet.be
Maxim Cournoyer schreef op di 14-06-2022 om 12:22 [-0400]:
Toggle quote (9 lines)
> Perhaps what we need is a proper logging infrastructure?  The above
> message could be flagged as a 'debug' level message.  stdout/stderr
> would only get to see the 'info' or higher level messages, the rest
> would be logged only to syslog, keeping the user interface clean.  I
> know such a logging mechanism exists in Guile-Lib, as the (logging
> logger) module [0].
>
> What do you think?

Attila Lendvai has some ideas on logging, see

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iIwEABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqi8YRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7im3AQDG0H2PY4bRJ1GZibkey2TMYiQJ
6wOU3IWz4DfAPjkSKgD4ho8hUG4SCV0++NIZwERaeT1ALEZb8iM1+JjpiPWUAQ==
=ylRa
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 15 Jun 2022 02:54
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55857@debbugs.gnu.org)
875yl2tfoa.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (2 lines)
> Ludovic Courtès <ludo@gnu.org> writes:

[...]

Toggle quote (10 lines)
>> The message is produced by shepherd as a response to an expression that
>> ‘guix system reconfigure’ tells it to evaluate, in (gnu services herd).
>> And all this happens as part of the live service upgrade mechanism.
>>
>> Admittedly, this particular message is not something one cares about as
>> a user, but it seemed safer to print messages shepherd might send during
>> that operation.
>
> Perhaps what we need is a proper logging infrastructure?

The difficulty here is that the message comes from shepherd without a
priority/level flag. Usually those messages are well worth displaying
because they show what services got restarted, what failed, etc. But
this one message is the fly in the ointment…

Ludo’.
M
M
Maxim Cournoyer wrote on 15 Jun 2022 08:51
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 55857@debbugs.gnu.org)
87y1xyc4cv.fsf@gmail.com
Hello,

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

Toggle quote (23 lines)
> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>
> [...]
>
>>> The message is produced by shepherd as a response to an expression that
>>> ‘guix system reconfigure’ tells it to evaluate, in (gnu services herd).
>>> And all this happens as part of the live service upgrade mechanism.
>>>
>>> Admittedly, this particular message is not something one cares about as
>>> a user, but it seemed safer to print messages shepherd might send during
>>> that operation.
>>
>> Perhaps what we need is a proper logging infrastructure?
>
> The difficulty here is that the message comes from shepherd without a
> priority/level flag. Usually those messages are well worth displaying
> because they show what services got restarted, what failed, etc. But
> this one message is the fly in the ointment…

Yes, I wasn't clear but I meant *Shepherd* needs a proper logging
infrastructure (although it seems to me the logging library in Guile-Lib
could be used in any Guile project, Guix included -- the way the
'logging' module comes standard in Python and preferred to printing or
reinventing a logging system :-)).

Maxim
L
L
Ludovic Courtès wrote on 16 Jun 2022 03:43
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55857@debbugs.gnu.org)
871qvonb1e.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (2 lines)
> Ludovic Courtès <ludo@gnu.org> writes:

[...]

Toggle quote (8 lines)
>> The difficulty here is that the message comes from shepherd without a
>> priority/level flag. Usually those messages are well worth displaying
>> because they show what services got restarted, what failed, etc. But
>> this one message is the fly in the ointment…
>
> Yes, I wasn't clear but I meant *Shepherd* needs a proper logging
> infrastructure

Ah well, it has syslog! Syslog defines priorities and sources; we
should take advantage of that.

Ludo’.
L
L
Ludovic Courtès wrote on 27 Apr 2023 06:29
control message for bug #55857
(address . control@debbugs.gnu.org)
87354lwj0d.fsf@gnu.org
tags 55857 notabug
close 55857
quit
M
M
Maxim Cournoyer wrote on 18 May 2023 20:33
Re: bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 55857@debbugs.gnu.org)
87jzx5kna8.fsf@gmail.com
Hi Ludo,

This bug was closed as notabug, but I still see it as an issue worth
fixing. Just using the (gnu services herd) API to query live services
ends up producing such a messages; I think from the 'resolve-transients'
procedure there that calls to eval-there unconditionally.

Perhaps the shepherd output could be redirected to /dev/null at that
specific place to avoid noisy output such as:

Toggle snippet (11 lines)
2023-05-18 23:15:00 22491 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: running...
2023-05-18 23:15:00 22491 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
2023-05-18 23:15:00 22491 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: completed in 0.029s
2023-05-18 23:20:00 22804 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: running...
2023-05-18 23:20:00 22804 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
2023-05-18 23:20:00 22804 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: completed in 0.039s
2023-05-18 23:25:00 23849 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: running...
2023-05-18 23:25:00 23849 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
2023-05-18 23:25:00 23849 /gnu/store/zmb73m7qgqagpb4vjhdd9jgkwp716p0m-wireguard-wg0-monitoring: completed in 0.028s

The above output is triggered by this code [0].


--
Thanks,
Maxim
L
L
Ludovic Courtès wrote on 24 May 2023 06:48
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 55857@debbugs.gnu.org)
875y8hn8l8.fsf@gnu.org
Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (5 lines)
> This bug was closed as notabug, but I still see it as an issue worth
> fixing. Just using the (gnu services herd) API to query live services
> ends up producing such a messages; I think from the 'resolve-transients'
> procedure there that calls to eval-there unconditionally.

I think the ‘eval-there’ call from ‘resolve-transients’ no longer
happens with shepherd 0.10.0, because the ‘transient?’ entry is always
present in the service alist.

Can you confirm?

Ludo’.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 55857@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 55857
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch