[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GNU Shepherd 0.10.0 released
From: |
Ludovic Courtès |
Subject: |
GNU Shepherd 0.10.0 released |
Date: |
Sat, 13 May 2023 16:24:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
We are pleased to announce the GNU Shepherd version 0.10.1. This
release represents 132 commits by two people. It is a major overhaul of
shepherd internals, addressing shortcomings and providing new features
that help comprehend system state.
• About
The GNU Shepherd is a service manager written in Guile that looks
after the herd of daemons running on the system. It can be used as an
“init” system (PID 1) and also by unprivileged users to manage
per-user daemons—e.g., tor, privoxy, mcron. It supports several
daemon startup mechanisms, including inetd and systemd-style socket
activation. The GNU Shepherd is configured in Guile Scheme and can be
extended in the same language. It builds on a simple memory-safe and
callback-free programming model.
The GNU Shepherd is developed jointly with the GNU Guix project; it is
used as the init system of Guix, GNU’s advanced GNU/Linux distribution.
https://www.gnu.org/software/shepherd/
• Download
Here are the compressed sources and a GPG detached signature:
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.0.tar.gz
https://ftp.gnu.org/gnu/shepherd/shepherd-0.10.0.tar.gz.sig
Use a mirror for higher download bandwidth:
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.0.tar.gz
https://ftpmirror.gnu.org/shepherd/shepherd-0.10.0.tar.gz.sig
Here are the SHA1 and SHA256 checksums:
1b0895fa5a0709ae612be50d5a486c137d862168 shepherd-0.10.0.tar.gz
Dl7kcFFihN35TBunXnj8aPvYImPlGPZlGtthKAlm6zY shepherd-0.10.0.tar.gz
The SHA256 checksum is base64 encoded, instead of the
hexadecimal encoding that most checksum tools default to.
Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact. First, be sure to download both the .sig file
and the corresponding tarball. Then, run a command like this:
gpg --verify shepherd-0.10.0.tar.gz.sig
The signature should match the fingerprint of the following key:
pub rsa4096 2014-08-11 [SC]
3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5
uid [ full ] Ludovic Courtès <ludo@gnu.org>
uid [ full ] Ludovic Courtès <ludo@chbouib.org>
uid [ full ] Ludovic Courtès (Inria) <ludovic.courtes@inria.fr>
If that command fails because you don't have the required public key,
or that public key has expired, try the following commands to retrieve
or refresh it, and then rerun the 'gpg --verify' command.
gpg --recv-keys 3CE464558A84FDC69DB40CFB090B11993D9AEBB5
As a last resort to find the key, you can try the official GNU
keyring:
wget -q https://ftp.gnu.org/gnu/gnu-keyring.gpg
gpg --keyring gnu-keyring.gpg --verify shepherd-0.10.0.tar.gz.sig
This release was bootstrapped with the following tools:
Autoconf 2.71
Automake 1.16.5
Makeinfo 7.0.3
Help2man 1.49.2
• Changes since version 0.9.3 (excerpt from the NEWS file)
** Distinguish ‘starting’ and ‘stopping’ intermediate service statuses
In previous version, a service would be either “running” or “stopped”. The
intermediate states “starting” and “stopping” are now properly captured and
you can see them when running ‘herd status’.
** ‘start’ and ‘stop’ block when service is already being started/stopped
<https://issues.guix.gnu.org/54786#4>
With previous version, a client running ‘herd start SERVICE’ while SERVICE is
already being started would cause shepherd to attempt to start a second
instance of that service, ultimately resulting in confusion, disappointment,
and frustration.
This is no longer the case: when a service is already being started/stopped,
additional invocation of ‘herd start’ or ‘herd stop’ now block until the
service is running/stopped.
** ‘shepherd’ starts services in parallel
Services started with ‘start-in-the-background’ and more generally service
dependencies get started in parallel. This can reduce startup times in case
of a “wide” service dependency graph with some services that take a while to
start.
** ‘shepherd’ keeps track of failures and status change times
For each service, shepherd maintains an event log including the time of recent
status changes as well as the time of startup failures, if any. The ‘herd
status SERVICE’ command now shows the time when the service entered its
current status and whether it failed to start; ‘herd status’ also prominently
lists services that failed to start.
** New ‘herd log’ command
Related to the previous item, the new ‘herd log’ command displays an aggregate
of the service event logs, showing the time at which each service changed
statuses.
** New ‘herd graph’ command
The new ‘herd graph’ command emits a Graphviz/Dot representation of the
service dependency graph, which can be viewed for example with ‘xdot’:
herd graph | xdot -
Guix System users get similar information with ‘guix system shepherd-graph’
(and likewise for Guix Home). The difference here is that this reflects the
current system status, showing transient services, services that failed to
start, and so on.
** ‘herd’ output is colorized
At long last! We hope you’ll enjoy a little bit of coloring to highlight
important bits in the output of various commands.
** New services shipped: ‘monitoring’ and ‘repl’
The Shepherd now ships with optional services—see “Service Collection” in the
manual. The ‘monitoring’ service logs resource usage of the ‘shepherd’
process itself. The ‘repl’ service runs a read-eval-print loop (REPL) in the
‘shepherd’ so you can hack it live—enjoy it, but handle it with care!
** Socket-actived, systemd-style services can now be started eagerly
The ‘make-systemd-constructor’ procedure has a new #:lazy-start? parameter.
It defaults to #true, meaning that the process is started lazily, on the first
connection to one of its sockets, as was the case in 0.9.x. Passing
#:lazy-start? #false instructs shepherd to instead start the process eagerly,
as soon as the listening sockets are ready.
This is useful for services that require socket activation as a startup
synchronization mechanism, yet are expected to run as soon as possible. An
example is ‘guix publish --advertise’: it should be started eagerly so it can
start advertising itself via Avahi.
** Each registered name maps to exactly one service
There used to be a fuzzy notion of “conflicting services”, when a given
service name could potentially refer to more than one service. This has
proved to be confusing more than anything else; now, each registered service
name refers to exactly one service. The interface related to that feature,
such as the ‘conflicts-with’ method, is done.
** For systemd and inetd services, retry ‘bind’ upon EADDRINUSE
<https://issues.guix.gnu.org/58485#13>
Services started with ‘make-systemd-constructor’ and ‘make-inetd-constructor’
will now retry several times when ‘bind’ returns EADDRINUSE (“Address already
in use”) for their listening socket(s).
** ‘system’ and ‘make-system-constructor’ are now non-blocking
<https://issues.guix.gnu.org/61803>
In versions up to 0.9.3, calling Guile’s ‘system’ procedure (which is what
‘make-system-constructor’ does) would block the ‘shepherd’ process until the
shell spawned by ‘system’ has terminated. This is no longer the case.
** GOOPS interface is deprecated
When it was created in 2002, the Shepherd (née dmd) embraced GOOPS, Guile’s
object-oriented programming system, then a brand new and promising approach
for 21st century programs. In hindsight, while there were a couple of classes
and a bunch of methods, the code base was not really making much use of GOOPS.
The current maintainer deemed it unnecessary and encouraging a programming
style at odds with the shiny horizon of purely functional, actor-style
programming.
The GOOPS interface is still available in 0.10.0; for example, you can still
write ~(make <service> #:provides …)~ in your configuration file. However,
GOOPS support will be removed in the next major series, most likely labeled
1.0.
A new interface has been defined. Check out the “Legacy GOOPS Interface”
section of the manual for more information, and email guix-devel@gnu.org if
you have any questions or concerns.
** Interfaces removed and changed
Several obscure or undocumented interfaces were removed:
- support for the ‘unknown’ service;
- support for “persistency” (sic);
- the ‘cd’ action of the ‘root’ service;
- the ‘launch-service’ procedure of (shepherd service).
New deprecations:
- ‘make-actions’ is deprecated in favor of ‘actions’;
- calling ‘register-services’ with an arbitrary number of arguments is now
deprecated; you should now call it with a single argument, the list of
services to register.
** Major internal overhaul
As you can guess from the list of user-visible changes above, the Shepherd has
undergone a major internal overhaul. The 0.9.x series introduced the use of
Fibers, Guile’s lightweight concurrent facility; shepherd took advantage of it
notably with the introduction of systemd-style and inetd-style services. This
new stable series takes it further.
In particular, each <service> record has an associated fiber called the
“service controller”. Following the actor model, each of these fibers reacts
to messages it receives, be they event notification—e.g., process
termination—or user requests—e.g., querying the service status, requesting
that the service be stopped. Other noteworthy actors include the “process
monitor” and the “service registry”.
This has allowed us to address a number of race conditions while also leading
to clearer code with linear flows that one can more easily reason about.
Overall, it makes the code base much more pleasant to work with and certainly
easier to hack than other implementations mired in the “callback hell”.
Documentation has been overhauled as well to reflect all these changes. Check
out the new subsections under “Services” for more information.
** Updated translations: de, ro, uk
The Shepherd is fully translated in German, Romanian, and Ukrainian; partial
translations are available for a dozen of languages. To help make the
Shepherd speak your language, check out the Translation Project:
https://translationproject.org/domain/shepherd.html
Please report bugs to bug-guix@gnu.org.
Join guix-devel@gnu.org for discussions.
Ludovic, on behalf of the Shepherd herd.
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- GNU Shepherd 0.10.0 released,
Ludovic Courtès <=