emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#32128: closed ([PATCH 0/2] Support custom actions


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#32128: closed ([PATCH 0/2] Support custom actions for Shepherd services)
Date: Thu, 12 Jul 2018 22:41:02 +0000

Your message dated Fri, 13 Jul 2018 00:40:18 +0200
with message-id <address@hidden>
and subject line Re: [bug#32128] [PATCH 0/2] Support custom actions for 
Shepherd services
has caused the debbugs.gnu.org bug report #32128,
regarding [PATCH 0/2] Support custom actions for Shepherd services
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
32128: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32128
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH 0/2] Support custom actions for Shepherd services Date: Wed, 11 Jul 2018 23:47:17 +0200
Hello Guix!

This is a long-awaited feature—nothing fancy, but it can certainly be
useful as illustrated by the ‘herd schedule mcron’ example below.

I suppose we can add actions for hot-swapping and reconfiguration of
services that support it, such as nginx: <https://bugs.gnu.org/26830>.

Feedback welcome!

Ludo’.

Ludovic Courtès (2):
  services: shepherd: Support custom actions.
  services: mcron: Add 'schedule' action.

 doc/guix.texi             | 74 +++++++++++++++++++++++++++++++++++++++
 gnu/services/herd.scm     |  3 ++
 gnu/services/mcron.scm    | 67 ++++++++++++++++++++++++++---------
 gnu/services/shepherd.scm | 23 +++++++++++-
 gnu/tests/base.scm        |  7 ++++
 5 files changed, 156 insertions(+), 18 deletions(-)

-- 
2.18.0




--- End Message ---
--- Begin Message --- Subject: Re: [bug#32128] [PATCH 0/2] Support custom actions for Shepherd services Date: Fri, 13 Jul 2018 00:40:18 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Hello Clément,

Clément Lassieur <address@hidden> skribis:

> Ludovic Courtès <address@hidden> writes:
>
>> Hello Guix!
>>
>> This is a long-awaited feature—nothing fancy, but it can certainly be
>> useful as illustrated by the ‘herd schedule mcron’ example below.
>>
>> I suppose we can add actions for hot-swapping and reconfiguration of
>> services that support it, such as nginx: <https://bugs.gnu.org/26830>.
>
> This is fantastic!  Thank you :-)  And it looks good to me.

Thanks!  I’ve pushed it.

> A few notes though (more about the Shepherd):
>
> - It would be great to be able to use actions even when services are not
>   started.  In the case of the "mcron" service, for example, it makes
>   sense: one may not want to risk spawning a program while wanting to
>   debug the schedule.

Indeed, I think this restriction should be waived, and this comment from
ca. 2003 in shepherd/service.scm suggests it’s unfounded:

    ;; Calling default-action will be allowed even when the service is
    ;; not running, as it provides generally useful functionality and
    ;; information.
    ;; FIXME: Why should the user-implementations not be allowed to be
    ;; called this way?

Done in Shepherd commit 5ab8cbc9bcfce586a5389ad95a65f011d02bd289.

> - It seems that sometimes the SIGCHLD handler is invoked, when the
>   'running' field is not yet set.  Should CALL-WITH-BLOCKED-ASYNCS be
>   used?

As discussed on IRC, the error we were getting when doing things like
“herd schedule mcron 50” (“waitpid: No child processes”), came from the
fact that ‘close-pipe’ invokes ‘waitpid’, but there’s a race with the
Shepherd’s SIGCHLD handler, which might get to call ‘waitpid’ earlier.

I’ve adjusted to code to protect against it but without blocking asyncs,
which seems safer.

Thank you!

Ludo’.


--- End Message ---

reply via email to

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