From: ludo@gnu.org (Ludovic Courtès)
To: Oleg Pykhalov <go.wigust@gmail.com>
Cc: 27386@debbugs.gnu.org
Subject: bug#27386: offloading documentation and env
Date: Fri, 07 Jul 2017 12:00:43 +0200 [thread overview]
Message-ID: <87inj4d0s4.fsf@gnu.org> (raw)
In-Reply-To: <8737a9n1ur.fsf@clover.i-did-not-set--mail-host-address--so-tickle-me> (Oleg Pykhalov's message of "Thu, 06 Jul 2017 16:15:08 +0300")
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> ludo@gnu.org (Ludovic Courtès) writes:
>
>> Hmm could it be that ‘machine-load’ in (guix scripts offload) always
>> returns +inf.0, for instance because it fails to run “cat /proc/loadavg”
>> on the remote machine? (If it succeeded we would see the message “load
>> on machine XYZ is N”.)
>>
>> https://git.savannah.gnu.org/cgit/guix.git/tree/guix/scripts/offload.scm#n393
>
> Can I actually look what is happening somehow?
Yes, you can make a checkout of Guix, add ‘pk’ calls in (guix scripts
offload) (see below), and run the daemon from there:
./pre-inst-env guix-daemon --build-users-group=guixbuild
‘pk’ is a function that prints its argument and returns it, so you could
do:
[-- Attachment #2: Type: text/x-patch, Size: 546 bytes --]
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 566d117b0..0dd849942 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -398,7 +398,7 @@ allowed on MACHINE. Return +∞ if MACHINE is unreachable."
((? session? session)
(let* ((pipe (open-remote-pipe* session OPEN_READ
"cat" "/proc/loadavg"))
- (line (read-line pipe)))
+ (line (pk 'line (read-line pipe))))
(close-port pipe)
(if (eof-object? line)
[-- Attachment #3: Type: text/plain, Size: 716 bytes --]
to print the line that is read.
>> What does “ssh USER@magnolia.local -i KEY cat /proc/loadavg” return,
>> where USER and KEY are those specified in your machines.scm file?
>
> natsu@clover ~$
> (list (build-machine
> (name "magnolia.local")
> (system "x86_64-linux")
> (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMRy+enQECs2CsjrbSIfnNHExcUwzHFa7KUnhwDIeWOV")
> (user "natsu")
> (private-key
> (string-append (getenv "HOME")
> "/.ssh/identity-for-guix"))
> (speed 2.)))
> ssh natsu@magnolia.local -i $HOME/.ssh/identity-for-guix cat /proc/loadavg
> 0.05 0.08 0.02 1/247 13756
Hmm, looks good.
Ludo’.
next prev parent reply other threads:[~2017-07-07 10:01 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-15 17:05 bug#27386: offloading documentation and env ng0
2017-06-15 21:11 ` ng0
2017-06-15 22:19 ` ng0
2017-06-15 22:34 ` ng0
2017-06-26 19:56 ` Ludovic Courtès
2017-06-26 21:15 ` ng0
2017-06-27 13:39 ` Ludovic Courtès
2017-06-27 14:54 ` ng0
2017-06-27 19:38 ` Ludovic Courtès
2017-06-27 20:31 ` ng0
2017-06-28 8:31 ` Ludovic Courtès
2017-06-28 11:45 ` ng0
2017-06-28 21:46 ` Ludovic Courtès
2017-06-28 22:36 ` ng0
2017-06-29 11:50 ` Ludovic Courtès
2017-07-04 13:51 ` Oleg Pykhalov
2017-07-04 15:43 ` Oleg Pykhalov
2017-07-04 16:02 ` Oleg Pykhalov
2017-07-04 21:36 ` Ludovic Courtès
2017-07-05 17:06 ` Oleg Pykhalov
2017-07-06 7:33 ` Ludovic Courtès
2017-07-06 13:15 ` Oleg Pykhalov
2017-07-07 10:00 ` Ludovic Courtès [this message]
[not found] ` <871spsginl.fsf@clover.i-did-not-set--mail-host-address--so-tickle-me>
2017-07-08 16:33 ` bug#27386: [SOLVED] " Ludovic Courtès
2017-09-28 19:40 ` Divan Santana
2017-09-28 19:44 ` Divan Santana
2017-09-29 7:49 ` Ludovic Courtès
2017-09-29 17:02 ` Ricardo Wurmus
2017-09-29 19:35 ` Divan Santana
2017-09-29 19:33 ` Divan Santana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87inj4d0s4.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=27386@debbugs.gnu.org \
--cc=go.wigust@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).