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

2023-05-24 Thread Ludovic Courtès
Hi,

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





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

2023-05-18 Thread Maxim Cournoyer
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





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

2022-06-16 Thread Ludovic Courtès
Hi,

Maxim Cournoyer  skribis:

> Ludovic Courtès  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’.





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

2022-06-15 Thread Maxim Cournoyer
Hello,

Ludovic Courtès  writes:

> Hi,
>
> Maxim Cournoyer  skribis:
>
>> Ludovic Courtès  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





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

2022-06-15 Thread Ludovic Courtès
Hi,

Maxim Cournoyer  skribis:

> Ludovic Courtès  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’.





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

2022-06-14 Thread Maxime Devos
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.


signature.asc
Description: This is a digitally signed message part


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

2022-06-14 Thread Maxim Cournoyer
Hi Ludovic,

Ludovic Courtès  writes:

> Hi,
>
> Maxim Cournoyer  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/





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

2022-06-10 Thread Ludovic Courtès
Hi,

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





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

2022-06-08 Thread Maxim Cournoyer
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