guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird errors; shepherd


From: Ludovic Courtès
Subject: Re: weird errors; shepherd
Date: Wed, 24 Jan 2018 15:47:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

Danny Milosavljevic <address@hidden> skribis:

> Everyone:
>
> After I've tried writing some shepherd service I have to say that writing a
> shepherd "start" action is way too difficult.
>
> Even now, I've not gotten to work:
>
> * Having the activation depend on any other service.

I’m not sure what you mean.  There’s no notion of dependencies among
activation snippets, let alone between activation snippets and service
starts (when booting, activation snippets run *before* shepherd is
started).  Perhaps there’s a misunderstanding here?

> * Logging errors from start-trytond to stderr or stdout.

You can write:

  (make-forkexec-constructor
    …
    #:log-file "/var/log/something.log")

which will redirect stdout/stderr to that file (info "(shepherd) Service
De- and Constructors").

Now, I think stdout/stderr should be captured by default, and perhaps
made available with a journalctl-like interface (Leo proposed a GSoC
project along these lines.)

>   As far as I understand make-forkexec-constructor takes special care not
>   to kill stderr.  As long there's no log-file specified it should leave 
> stdout
>   and stderr alone.  So where does the text go?

To PID 1’s stdout/stderr, i.e., /dev/console (which sucks).

> I've had other problems like:
>
> * root's shepherd hangs sometimes and herd can't connect to it anymore.

That’s a serious bug.  Can you reproduce it?

> * When I use (error "XXX") in a shepherd start block, booting the system
> drops me into a REPL and doesn't let me out again (instead of just failing
> this one service and continuing to boot).

That’s inconvenient but “expected” in the sense that the ‘start’ method
is called right from shepherd.conf.  Perhaps we should call ‘start’ at a
later stage.

As you write, the Shepherd leaves quite a bit to be desired.  The good
news is that it’s a very small code base, so I’d encourage people to
look at it when they find something they’re dissatisfied with, and see
how it can be improved.

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]