[Nix-dev] If remote build machine is not reachable build jobs hang. (zeroconf ?)

Marc Weber marco-oweber at gmx.de
Wed Apr 28 16:25:08 CEST 2010


Excerpts from Eelco Dolstra's message of Wed Apr 28 16:18:22 +0200 2010:
> Hi,
> 
> On 04/27/2010 09:55 PM, Marc Weber wrote:
> 
> > This is very annoying because you can't even rebuild nixos without patching,
> > can you?
> 
> You can use --no-build-hook when that happens.
I've missed that.

> > So what about introducing a new env var called NIX_REMOTE_PING_TIMEOUT
> > which causes the build-remote.pl script to ping a machine before sending a
> > buiild request?
> 
> Pinging may not work if the target machine is behind a firewall.
> 
> A while ago (r19794) I modified build-remote.pl to try to connect to a machine
> and fall back to using other machines of the right type if that fails.  Doesn't
> this already do what you need?  (If it takes too long to fail, you may want to
> look at the ConnectTimeout ssh option.)
Probably I must set that option then.
yes, it took too long.

> > I've written this patch (without testing yet). What do you think about it?
> This patch will probably cause many unnecessary pings, because it pings all
> machines every time the configuration file is read (which may be very often).

Thinking about it again there are more options:

Write a custom script pinging the machines once in a while writing
/etc/nix.machines. There is already config.nix.manualNixMachines
which will also minimize the ping overhead when building.

running this script once when network context is changing is enough
then. That's what I'm going to do.. Avahi would be fun though.
But I don't know yet how much effort to put in because machines must be
trusted etc..

Marc Weber



More information about the nix-dev mailing list