From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 33508@debbugs.gnu.org
Subject: [bug#33508] [PATCH] gnu: Add ability to restart services on system reconfigure
Date: Tue, 01 Jan 2019 22:25:30 +1100 [thread overview]
Message-ID: <87h8eszkk5.fsf@zancanaro.id.au> (raw)
In-Reply-To: <87lg4yws9a.fsf@gnu.org>
Hey Ludo’,
Sorry for not responding to this email for so long. I've been
trying to think through some of the issues around this, and I'm
not confident that I have thought through the issues well enough
to actually decide on a good course of action, beyond what I have
already written. I'll respond to a few specific things in your
message, but I don't even know what a good solution would look
like, let alone how to build it.
On Mon, Dec 10 2018, Ludovic Courtès wrote:
> In what sense is guix-daemon “always safe to restart”? It’s
> actually a difficult question for me.
I agree it's tricky. I had mostly intended that as an example,
because I used guix-daemon for my testing, but ...
> You could argue that its child guix-daemon processes will remain
> live when we restart it, meaning that client connections remain
> active and valid. I believe this is indeed the case, though it
> would be worth double-checking.
... this is what I was thinking. I'm fairly sure this is the case,
given my observations while I was testing these patches.
> Now, if safe-to-restart means that we automatically invoke the
> “restart” action on guix-daemon, that means that anything that
> depends on it (‘guix-publish’, ‘cuirass’, ‘hpcguix-web’, etc.)
> would be restarted as well (even though I *think* we don’t have
> to in this case.) But these may not be safe to restart: for
> example, on may want ‘guix-publish’ to run uninterrupted.
At the moment we have no way to capture this, particularly in the
Shepherd. There's no way to restart a service without restarting
dependent services, but I particularly want to pick up on the
"uninterrupted" by talking about nginx below.
> ...
> sshd, nginx, and maybe guix-daemon can more or less be
> live-upgraded, meaning that (1) existing connections are
> preserved but future connections will talk to the new daemon,
> and as a corollary, (2) dependent services do not need to be
> stopped & restarted.
I did some research into nginx, and it turns out that it is
possible to upgrade nginx with zero-downtime by running two
daemons simultaneously listening on the same port(s), then
shutting down the old daemon after the new one has successfully
started[1]. This allows for an "uninterrupted" upgrade, but I'm
not confident that I would be able to implement it within our
current framework.
In all, I haven't done anything with this in the last month. I've
thought about it a few times, but it just feels a bit
overwhelming.
Carlo
[1]: https://nginx.org/en/docs/control.html#upgrade
next prev parent reply other threads:[~2019-01-01 11:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 11:41 [bug#33508] [PATCH] gnu: Add ability to restart services on system reconfigure Carlo Zancanaro
2018-11-26 12:42 ` Clément Lassieur
2018-11-26 20:11 ` Carlo Zancanaro
2018-11-26 21:02 ` Clément Lassieur
2018-11-26 21:59 ` Carlo Zancanaro
2018-11-30 12:12 ` Clément Lassieur
2018-12-01 2:31 ` Carlo Zancanaro
2018-12-13 14:22 ` Clément Lassieur
2018-12-09 16:59 ` Ludovic Courtès
2019-01-01 11:25 ` Carlo Zancanaro [this message]
2019-01-05 14:00 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8eszkk5.fsf@zancanaro.id.au \
--to=carlo@zancanaro.id.au \
--cc=33508@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).