unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
@ 2022-06-08 18:57 Maxim Cournoyer
  2022-06-10 21:55 ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-06-08 18:57 UTC (permalink / raw)
  To: 55857

Hello Guix,

The following message is shown when reconfiguring Guix System:

--8<---------------cut here---------------start------------->8---
shepherd: Evaluating user expression (and (defined? (quote transient?)) (map (# ?) ?)).
--8<---------------cut here---------------end--------------->8---

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-08 18:57 bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?) Maxim Cournoyer
@ 2022-06-10 21:55 ` Ludovic Courtès
  2022-06-14 16:22   ` Maxim Cournoyer
  0 siblings, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2022-06-10 21:55 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 55857

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.

Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-10 21:55 ` Ludovic Courtès
@ 2022-06-14 16:22   ` Maxim Cournoyer
  2022-06-14 16:50     ` Maxime Devos
  2022-06-15  9:54     ` Ludovic Courtès
  0 siblings, 2 replies; 9+ messages in thread
From: Maxim Cournoyer @ 2022-06-14 16:22 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 55857

Hi Ludovic,

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

> 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

[0]  https://www.nongnu.org/guile-lib/doc/ref/logging.logger/




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-14 16:22   ` Maxim Cournoyer
@ 2022-06-14 16:50     ` Maxime Devos
  2022-06-15  9:54     ` Ludovic Courtès
  1 sibling, 0 replies; 9+ messages in thread
From: Maxime Devos @ 2022-06-14 16:50 UTC (permalink / raw)
  To: Maxim Cournoyer, Ludovic Courtès; +Cc: 55857

[-- Attachment #1: Type: text/plain, Size: 595 bytes --]

Maxim Cournoyer schreef op di 14-06-2022 om 12:22 [-0400]:
> 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
https://issues.guix.gnu.org/55242#2 and later patches.

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-14 16:22   ` Maxim Cournoyer
  2022-06-14 16:50     ` Maxime Devos
@ 2022-06-15  9:54     ` Ludovic Courtès
  2022-06-15 15:51       ` Maxim Cournoyer
  1 sibling, 1 reply; 9+ messages in thread
From: Ludovic Courtès @ 2022-06-15  9:54 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 55857

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…

Ludo’.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-15  9:54     ` Ludovic Courtès
@ 2022-06-15 15:51       ` Maxim Cournoyer
  2022-06-16 10:43         ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2022-06-15 15:51 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 55857

Hello,

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

> 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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2022-06-15 15:51       ` Maxim Cournoyer
@ 2022-06-16 10:43         ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2022-06-16 10:43 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 55857

Hi,

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

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

[...]

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
       [not found] <87354lwj0d.fsf@gnu.org>
@ 2023-05-19  3:33 ` Maxim Cournoyer
  2023-05-24 13:48   ` Ludovic Courtès
  0 siblings, 1 reply; 9+ messages in thread
From: Maxim Cournoyer @ 2023-05-19  3:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 55857

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:

--8<---------------cut here---------------start------------->8---
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
--8<---------------cut here---------------end--------------->8---

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

[0]  https://issues.guix.gnu.org/63402#13-lineno225

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?)
  2023-05-19  3:33 ` Maxim Cournoyer
@ 2023-05-24 13:48   ` Ludovic Courtès
  0 siblings, 0 replies; 9+ messages in thread
From: Ludovic Courtès @ 2023-05-24 13:48 UTC (permalink / raw)
  To: Maxim Cournoyer; +Cc: 55857

Hi,

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

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




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-05-24 13:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 18:57 bug#55857: Odd Shepherd message on 'guix system reconfigure': (map (# ?) ?) Maxim Cournoyer
2022-06-10 21:55 ` Ludovic Courtès
2022-06-14 16:22   ` Maxim Cournoyer
2022-06-14 16:50     ` Maxime Devos
2022-06-15  9:54     ` Ludovic Courtès
2022-06-15 15:51       ` Maxim Cournoyer
2022-06-16 10:43         ` Ludovic Courtès
     [not found] <87354lwj0d.fsf@gnu.org>
2023-05-19  3:33 ` Maxim Cournoyer
2023-05-24 13:48   ` Ludovic Courtès

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