~ruther/guix-local

ref: 0ff55f9d77af987236796d3594de63d6903fa15f guix-local/guix/scripts/offload.scm -rw-r--r-- 31.9 KiB
27991c97 — Ludovic Courtès 9 years ago
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'.
2b513387 — Ludovic Courtès 9 years ago
offload: Test each machine only once.

* guix/scripts/offload.scm (check-machine-availability)[build-machine=?]:
New procedure.
Add call to 'delete-duplicates'.
bd834577 — Ludovic Courtès 9 years ago
offload: Do not read ~/.ssh/known_hosts.

* guix/scripts/offload.scm (open-ssh-session): Pass #:knownhosts to
'make-session'.
8d125cfc — Ludovic Courtès 9 years ago
offload: Increase the connection timeout.

* guix/scripts/offload.scm (open-ssh-session): Set #:timeout to 10.
0237d797 — Ludovic Courtès 9 years ago
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.
e11c42f2 — Ludovic Courtès 9 years ago
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.
1d48cf94 — Ludovic Courtès 9 years ago
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.
aebaee95 — Ludovic Courtès 9 years ago
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'.
463fb7d0 — Ludovic Courtès 9 years ago
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.
74afca5d — Ludovic Courtès 9 years ago
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.
0b724753 — Ludovic Courtès 9 years ago
offload: Warn about the lack of zlib support.

* guix/scripts/offload.scm (guix-offload): Print a warning when
'zlib-support?' returns false.
f3cf8606 — Ludovic Courtès 9 years ago
offload: Remove redundant call to 'topologically-sorted' in 'send-file'.

* guix/scripts/offload.scm (send-files): Remove call to
'topologically-sorted'.
3bf42806 — Hartmut Goebel 9 years ago
Merge branch 'master' into python-build-system
1cd1d8a7 — Ludovic Courtès 9 years ago
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.
bc1ad4e3 — Ludovic Courtès 9 years ago
offload: Drop 'remote-pipe'.

* guix/scripts/offload.scm (remote-pipe): Remove.
(machine-load): Use 'open-remote-pipe*' instead of 'remote-pipe'.
cf283dd9 — Ludovic Courtès 9 years ago
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.
e8a5db80 — Ludovic Courtès 9 years ago
offload: Remove 'with-nar-error-handling' macro.

* guix/scripts/offload.scm (with-nar-error-handling): Remove.
(guix-offload): Use 'with-error-handling' instead.
9e76eed3 — Ludovic Courtès 9 years ago
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'.
21531add — Ludovic Courtès 12 years ago
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.
d2478b4c — Mark H Weaver 9 years ago
Merge branch 'master' into core-updates
Next