unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [shepherd] herd status suggestion
@ 2018-06-10 10:34 Nils Gillmann
  2018-06-10 11:31 ` Ricardo Wurmus
  0 siblings, 1 reply; 5+ messages in thread
From: Nils Gillmann @ 2018-06-10 10:34 UTC (permalink / raw)
  To: guix-devel

Hi,

right now we have this view:

abyayala$ sudo herd status tor
Status of tor:
  It is stopped.
  It is disabled.
  Provides (tor).
  Requires (user-processes loopback syslogd).
  Conflicts with ().
  Will be respawned.
  Last respawned on Sun Jun 10 08:08:45Z 2018.


Would it be an option to change the status output to,
if it conflicts with no other service:

  Conflicts with no other services.

instead of the representation of an empty list?

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

* Re: [shepherd] herd status suggestion
  2018-06-10 10:34 [shepherd] herd status suggestion Nils Gillmann
@ 2018-06-10 11:31 ` Ricardo Wurmus
  2018-06-10 14:31   ` Nils Gillmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ricardo Wurmus @ 2018-06-10 11:31 UTC (permalink / raw)
  To: Nils Gillmann; +Cc: guix-devel


Hi Nils,

> abyayala$ sudo herd status tor
> Status of tor:
>   It is stopped.
>   It is disabled.
>   Provides (tor).
>   Requires (user-processes loopback syslogd).
>   Conflicts with ().
>   Will be respawned.
>   Last respawned on Sun Jun 10 08:08:45Z 2018.
>
>
> Would it be an option to change the status output to,
> if it conflicts with no other service:
>
>   Conflicts with no other services.
>
> instead of the representation of an empty list?

This sounds like a good idea.  The only argument in favour of keeping it
the way it is now is too weak to take serious: it makes it slightly
easier to parse the output of “herd status”.

Could you please prepare a patch to change the output?  It’s also worth
checking how gettext is used in shepherd (I don’t know more than that it
uses “l10n” as a “gettext” alias) to make sure that the string can be
translated.

Thanks for this proposal!

--
Ricardo

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

* Re: [shepherd] herd status suggestion
  2018-06-10 11:31 ` Ricardo Wurmus
@ 2018-06-10 14:31   ` Nils Gillmann
  2018-06-10 19:39     ` Ludovic Courtès
  0 siblings, 1 reply; 5+ messages in thread
From: Nils Gillmann @ 2018-06-10 14:31 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel, Nils Gillmann

Ricardo Wurmus transcribed 982 bytes:
> 
> Hi Nils,
> 
> > abyayala$ sudo herd status tor
> > Status of tor:
> >   It is stopped.
> >   It is disabled.
> >   Provides (tor).
> >   Requires (user-processes loopback syslogd).
> >   Conflicts with ().
> >   Will be respawned.
> >   Last respawned on Sun Jun 10 08:08:45Z 2018.
> >
> >
> > Would it be an option to change the status output to,
> > if it conflicts with no other service:
> >
> >   Conflicts with no other services.
> >
> > instead of the representation of an empty list?
> 
> This sounds like a good idea.  The only argument in favour of keeping it
> the way it is now is too weak to take serious: it makes it slightly
> easier to parse the output of “herd status”.
> 
> Could you please prepare a patch to change the output?  It’s also worth
> checking how gettext is used in shepherd (I don’t know more than that it
> uses “l10n” as a “gettext” alias) to make sure that the string can be
> translated.
> 
> Thanks for this proposal!
> 
> --
> Ricardo
> 
> 

Thanks!

I will look into this, I've looked at the file for the first time (ever? in a long time?) today.
If I can't figure out how to do all of it, I'll send further questions.



Related and similar: Would it be reasonable to change the output from list-style,
like:
  Depends on: (foo bar irks boot)

to the probably tiny bit better readable:

  Depends on: foo, bar, irks, boot

for humans?


I'm thinking that even though it is very obvious what we are looking at, we could almost entire sentences?
However, it's "interesting" to form sentences here without sounding like Captain Obvious...

Status of the service 'tor':
   It is stopped.
   It is disabled.
   Provides (tor).   <- 'tor' provides a service for running tor.    (? I haven't looked at the shepherd and our use of it, so this is just assuming this is possible.)
   Requires (user-processes loopback syslogd).  <- 'tor' requires these services: uer-processes, loopback, syslogd.
   Conflicts with ().               <-  There are no conflicting services./Conflicts with no other services. (when empty)  | alternative, when at least 1 element:  'tor' conflicts with: element.
   Will be respawned.               <- Upon crash, tor will be respawned.
   Last respawned on Sun Jun 10 08:08:45Z 2018.


But it could be that his is too long for output, and maybe could even be reduced to the simple statements we have.

Is there any documented work besides the code and documentation on why shepherd produces this output, any
logical conclusions or...?

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

* Re: [shepherd] herd status suggestion
  2018-06-10 14:31   ` Nils Gillmann
@ 2018-06-10 19:39     ` Ludovic Courtès
  2018-06-10 19:47       ` Nils Gillmann
  0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2018-06-10 19:39 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

Hello Nils,

Nils Gillmann <ng0@n0.is> skribis:

> Ricardo Wurmus transcribed 982 bytes:
>> 
>> Hi Nils,
>> 
>> > abyayala$ sudo herd status tor
>> > Status of tor:
>> >   It is stopped.
>> >   It is disabled.
>> >   Provides (tor).
>> >   Requires (user-processes loopback syslogd).
>> >   Conflicts with ().
>> >   Will be respawned.
>> >   Last respawned on Sun Jun 10 08:08:45Z 2018.
>> >
>> >
>> > Would it be an option to change the status output to,
>> > if it conflicts with no other service:
>> >
>> >   Conflicts with no other services.
>> >
>> > instead of the representation of an empty list?

[...]

> Related and similar: Would it be reasonable to change the output from list-style,
> like:
>   Depends on: (foo bar irks boot)
>
> to the probably tiny bit better readable:
>
>   Depends on: foo, bar, irks, boot
>
> for humans?

I agree with both proposals.  :-)

The output of ‘herd status’ is meant for humans to read, not for
machines to process, so it makes sense to make these changes IMO.  For
machines there’s a well-defined protocol that can be used, so we should
do our best to make ‘herd status’ useful to humans.

If you want to give it a try, this is all happening in
modules/shepherd/scripts/herd.scm.

Thank you,
Ludo’.

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

* Re: [shepherd] herd status suggestion
  2018-06-10 19:39     ` Ludovic Courtès
@ 2018-06-10 19:47       ` Nils Gillmann
  0 siblings, 0 replies; 5+ messages in thread
From: Nils Gillmann @ 2018-06-10 19:47 UTC (permalink / raw)
  To: Ludovic Court??s; +Cc: guix-devel

Ludovic Court??s transcribed 1.3K bytes:
> Hello Nils,
> 
> Nils Gillmann <ng0@n0.is> skribis:
> 
> > Ricardo Wurmus transcribed 982 bytes:
> >> 
> >> Hi Nils,
> >> 
> >> > abyayala$ sudo herd status tor
> >> > Status of tor:
> >> >   It is stopped.
> >> >   It is disabled.
> >> >   Provides (tor).
> >> >   Requires (user-processes loopback syslogd).
> >> >   Conflicts with ().
> >> >   Will be respawned.
> >> >   Last respawned on Sun Jun 10 08:08:45Z 2018.
> >> >
> >> >
> >> > Would it be an option to change the status output to,
> >> > if it conflicts with no other service:
> >> >
> >> >   Conflicts with no other services.
> >> >
> >> > instead of the representation of an empty list?
> 
> [...]
> 
> > Related and similar: Would it be reasonable to change the output from list-style,
> > like:
> >   Depends on: (foo bar irks boot)
> >
> > to the probably tiny bit better readable:
> >
> >   Depends on: foo, bar, irks, boot
> >
> > for humans?
> 
> I agree with both proposals.  :-)
> 
> The output of ‘herd status’ is meant for humans to read, not for
> machines to process, so it makes sense to make these changes IMO.  For
> machines there’s a well-defined protocol that can be used, so we should
> do our best to make ‘herd status’ useful to humans.
> 
> If you want to give it a try, this is all happening in
> modules/shepherd/scripts/herd.scm.
> 
> Thank you,
> Ludo’.
> 

Thanks!

I will see when I find the time. If I can't work on this in time, I'll let you know.

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

end of thread, other threads:[~2018-06-10 19:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-10 10:34 [shepherd] herd status suggestion Nils Gillmann
2018-06-10 11:31 ` Ricardo Wurmus
2018-06-10 14:31   ` Nils Gillmann
2018-06-10 19:39     ` Ludovic Courtès
2018-06-10 19:47       ` Nils Gillmann

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