From: Carlo Zancanaro <carlo@zancanaro.id.au>
To: Richard Sent <richard@freakingpenguin.com>
Cc: guix-devel@gnu.org
Subject: Re: Guix deploy --keep-going equivalent for machine connection failures
Date: Wed, 17 Jan 2024 20:43:49 +1100 [thread overview]
Message-ID: <874jfc8fca.fsf@zancanaro.id.au> (raw)
In-Reply-To: <494a6ad05644e3b4c215d2bdaf388811@freakingpenguin.com> (Richard Sent's message of "Mon, 15 Jan 2024 17:47:58 -0500")
On Mon, Jan 15 2024, Richard Sent wrote:
> At present this can be worked around by commenting out entries on the
> list, but this requires
> a) Already knowing what machine is offline
> b) Remembering to uncomment it later when the machine goes back online
> c) Generally feels "ugly" in a way that most Guix commands don't.
> d) Makes version control a pain
This is generally what I've done, but I see this as a manual form of
something that could easily be added the machines.scm file itself.
For instance, you could define a helper function and use it to filter
the list of machines, like so:
(define (reachable-host? machine)
(let ((configuration (machine-configuration machine)))
(cond
((machine-ssh-configuration? configuration)
(zero? (system* "ssh" (machine-ssh-configuration-host-name configuration)
"--" "true")))
(else
#f))))
(filter
reachable-host?
(list
(machine ...)
(machine ...)))
Using this sort of approach can implement whatever strategy you want, as
long as you can determine the machines which you want to deploy to
up-front (i.e. this can't implement a strategy that handles failure
partway through deployment).
Carlo
next prev parent reply other threads:[~2024-01-17 9:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-15 22:47 Guix deploy --keep-going equivalent for machine connection failures Richard Sent
2024-01-17 9:43 ` Carlo Zancanaro [this message]
2024-01-17 14:52 ` Csepp
2024-01-18 17:45 ` Attila Lendvai
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jfc8fca.fsf@zancanaro.id.au \
--to=carlo@zancanaro.id.au \
--cc=guix-devel@gnu.org \
--cc=richard@freakingpenguin.com \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.