guix-devel
[Top][All Lists]
Advanced

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

Re: Guix deploy --keep-going equivalent for machine connection failures


From: Csepp
Subject: Re: Guix deploy --keep-going equivalent for machine connection failures
Date: Wed, 17 Jan 2024 15:52:32 +0100

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 via email to

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