offload: Allow testing machines that match a regexp. * guix/scripts/offload.scm (check-machine-availability): Add 'pred' parameter and honor it. (guix-offload): for the "test" sub-command, accept an extra 'regexp' parameter. Pass a second argument to 'check-machine-availability'.
offload: Test each machine only once. * guix/scripts/offload.scm (check-machine-availability)[build-machine=?]: New procedure. Add call to 'delete-duplicates'.
offload: Do not read ~/.ssh/known_hosts. * guix/scripts/offload.scm (open-ssh-session): Pass #:knownhosts to 'make-session'.
offload: Increase the connection timeout. * guix/scripts/offload.scm (open-ssh-session): Set #:timeout to 10.
offload: Send the build log to the right file descriptor. This fixes a regression introduced in 21531add3205e400707c8fbfd841845f9a71863a whereby the build log would no longer be sent to FD 4, thereby leading the daemon to not see the build log. * guix/scripts/offload.scm (transfer-and-offload): Parameterize CURRENT-BUILD-OUTPUT-PORT.
offload: Fix plural of some messages. * guix/scripts/offload.scm (send-files): Use 'N_' for possibly plural message. Write "store item" instead of "store file". (retrieve-files): Likewise.
offload: Make the compression methods configurable. * guix/scripts/offload.scm (<build-machine>)[compression] [compression-level]: New fields. (open-ssh-session): Honor them. * doc/guix.texi (Daemon Offload Setup): Document them.
offload: Add "test" sub-command. * guix/scripts/offload.scm (assert-node-repl, assert-node-has-guix) (nonce, assert-node-can-import, assert-node-can-export) (check-machine-availability): New procedures. (%random-state): New variable. (guix-offload): Add case for "test". * doc/guix.texi (Daemon Offload Setup): Document it. Remove obsolete bit about remote invocation of 'guix build'.
offload: Do not abort when a machine is unreachable. * guix/scripts/offload.scm (machine-load): Wrap 'open-ssh-session' call in 'false-if-exception'; return +inf.0 if it returns #f.
offload: Gracefully report connection failures. * guix/scripts/offload.scm (open-ssh-session): Check the return value of 'connect!'. Call 'leave' when it's not 'ok.
offload: Warn about the lack of zlib support. * guix/scripts/offload.scm (guix-offload): Print a warning when 'zlib-support?' returns false.
offload: Remove redundant call to 'topologically-sorted' in 'send-file'. * guix/scripts/offload.scm (send-files): Remove call to 'topologically-sorted'.
Merge branch 'master' into python-build-system
offload: Call 'machine-load' only once per machine. This fixes a longstanding issue where 'choose-build-machine' would make on average O(N log(N)) calls to 'machine-load', plus an extra call for the selected machine, instead of N calls. * guix/scripts/offload.scm (machine-load): Add comment. (machine-power-factor, machine-less-loaded-or-faster?): Remove. (choose-build-machine)[machines+slots]: Rename to... [machines+slots+loads]: ... this. [undecorate]: Adjust accordingly. [machine-less-loaded-or-faster?]: New procedure. Remove extra 'machine-load' call in body.
offload: Drop 'remote-pipe'. * guix/scripts/offload.scm (remote-pipe): Remove. (machine-load): Use 'open-remote-pipe*' instead of 'remote-pipe'.
offload: Rewrite to make direct RPCs to the remote daemon. * guix/scripts/offload.scm (<build-machine>)[daemon-socket]: New field. (connect-to-remote-daemon): New procedure. (%gc-root-file, register-gc-root, remove-gc-roots, offload): Remove. (transfer-and-offload): Rewrite using 'connect-to-remote-daemon' and RPCs over SSH. (store-import-channel, store-export-channel): New procedures. (send-files, retrieve-files): Rewrite using these.
offload: Remove 'with-nar-error-handling' macro. * guix/scripts/offload.scm (with-nar-error-handling): Remove. (guix-offload): Use 'with-error-handling' instead.
offload: Reuse SSH session during 'transfer-and-offload'. * guix/scripts/offload.scm (remote-pipe): Replace 'machine' parameter with 'session'. Remove 'open-ssh-session' call. (register-gc-root): Replace 'machine' with 'session'. Use ' session-get' instead of 'build-machine-name'. (remove-gc-roots, offload, send-files, retrieve-files): Likewise. (transfer-and-offload): Add 'open-ssh-session' call. Handle 'offload' errors here. (machine-load): Add call to 'open-ssh-session'.
offload: Use Guile-SSH instead of GNU lsh. * guix/scripts/offload.scm (<build-machine>)[ssh-options]: Remove. [host-key, host-key-type]: New fields. (%lsh-command, %lshg-command, user-lsh-private-key): Remove. (user-openssh-private-key, private-key-from-file*): New procedures. (host-key->type+key, open-ssh-session): New procedures. (remote-pipe): Remove 'mode' parameter. Rewrite in terms of 'open-ssh-session' etc. Update users. (send-files)[missing-files]: Rewrite using the bidirectional channel port. Remove call to 'call-with-compressed-output-port'. (retrieve-files): Remove call to 'call-with-decompressed-port'. (machine-load): Remove exit status logic. * doc/guix.texi (Requirements): Mention Guile-SSH. (Daemon Offload Setup): Document 'host-key' and 'private-key'. Show the default value on each @item line. * m4/guix.m4 (GUIX_CHECK_GUILE_SSH): New macro. * config-daemon.ac: Use 'GUIX_CHECK_GUILE_SSH'. Set 'HAVE_DAEMON_OFFLOAD_HOOK' as a function of that.
Merge branch 'master' into core-updates