help-guix
[Top][All Lists]
Advanced

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

Re: How to offload builds only when some of the offload build servers ar


From: zimoun
Subject: Re: How to offload builds only when some of the offload build servers are available
Date: Mon, 02 May 2022 10:37:12 +0200

Hi,

On Sun, 01 May 2022 at 16:01, Kyle Andrews <kyle@posteo.net> wrote:
> How can I configure the offload functionality to check whether the build
> machines specifiec in ~/etc/guix/machines.scm~ are available first; and
> if they are not (e.g. because I am roaming outside my local network)
> just proceed with builds locally so that I don't have to remember to
> pass --no-offload?

As discussed in this old and still open bug#24496 [1], you could do
something like that for ’/etc/guix/machines.scm’:

--8<---------------cut here---------------start------------->8---
(define the-machine (build-machine …))

  (if (managed-to-connect-timely the-machine)
      (list the-machine)
      '())
--8<---------------cut here---------------end--------------->8---

where ’managed-to-connect-timely’ could be a plain ’system*’ call via
’ping’ to the target offload machine.  Guile probably provides a better
interface for network check. :-)

However, note that it could be nice to have something dynamically
handled [2] by the daemon.  Feature missing…


1: <https://issues.guix.gnu.org/issue/24496#3>
2: <https://yhetil.org/guix/86zgp0hec6.fsf@gmail.com>


Cheers,
simon



reply via email to

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