all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Csepp <raingloom@riseup.net>
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: Richard Sent <richard@freakingpenguin.com>, guix-devel@gnu.org
Subject: Re: Guix deploy --keep-going equivalent for machine connection failures
Date: Wed, 17 Jan 2024 15:52:32 +0100	[thread overview]
Message-ID: <86le8o6mea.fsf@riseup.net> (raw)
In-Reply-To: <874jfc8fca.fsf@zancanaro.id.au>

[-- Attachment #1: Type: text/plain, Size: 1510 bytes --]

Carlo Zancanaro <carlo@zancanaro.id.au> writes:

> 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

One potential problem with this is that it might try to reconnect too often and wait too long for each timeout.

  reply	other threads:[~2024-01-17 14:55 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
2024-01-17 14:52   ` Csepp [this message]
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=86le8o6mea.fsf@riseup.net \
    --to=raingloom@riseup.net \
    --cc=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.