unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: levenson@mmer.org
To: 40082@debbugs.gnu.org
Subject: bug#40082: guix offload error messages need improvements
Date: Sun, 15 Mar 2020 19:57:07 +0100	[thread overview]
Message-ID: <84mu8higzg.fsf@mmer.org> (raw)

Hi Guix,

guix offload error messages are cumbersome. With a help from guys on irc channel(many thanks), I finally manage it to work by installing guix and guile packages under the remote user.

--8<---------------cut here---------------start------------->8---
# local
aabramov@delta:~/factory/guix$ guix describe
Generation 340	Mar 12 2020 18:23:16	(current)
  guix be78906
    repository URL: file:///home/aabramov/factory/guix
    branch: master
    commit: be78906592c761aa2a67e979074561e459efdcac
# remote
[aabramov@minion100 ~]$ guix describe
Generation 2	Mar 15 2020 17:42:04	(current)
  guix be78906
    repository URL: file:///home/aabramov/guix
    branch: master
    commit: be78906592c761aa2a67e979074561e459efdcac
--8<---------------cut here---------------end--------------->8---

machines.scm is ready, and here is my fist attempt to run offload test.

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ guix offload test
guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'minion100' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: 'minion100' is running GNU Guile 3.0.1
guix offload: error: failed to connect to `#<input-output: channel (open) 7fc8c903a260>': Protocol error
--8<---------------cut here---------------end--------------->8---

There is no errors in my local guix-daemon nor remote one. --debugs doesn't help either

Same thing with copy.

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ guix copy --to=minion100 hello
guix copy: error: failed to connect to `#<input-output: channel (open) 7f64d7d18de0>': Protocol error
aabramov@delta:~/factory/guix$ guix copy --from=minion100 hello
guix copy: error: failed to connect to `#<input-output: channel (open) 7f314e202cc0>': Protocol error
--8<---------------cut here---------------end--------------->8---

Guix says that my minion is running GNU Guile 3.0 which is for me a good sign, but apparently it is not.

I thought that guile 3.0 is an issues, so let's install guile-2. Here is my remote profile:

--8<---------------cut here---------------start------------->8---
[aabramov@minion100 ~]$ guix package -l
Generation 1	Mar 09 2020 22:22:03
  glibc-locales	2.29	out	/gnu/store/03nvilh2x4z07dxv7h13gh986vvgpnsf-glibc-locales-2.29

Generation 2	Mar 09 2020 22:28:46
 + emacs-next	27.0.50-0.36abf68	out	/gnu/store/61bwd5sn4s25lm2m9shbrja5d6z1d17y-emacs-next-27.0.50-0.36abf68

Generation 3	Mar 15 2020 16:54:24
 + sshuttle	0.78.5	out	/gnu/store/13s2jadhdvpk99mnkf6y1r42mamijzrd-sshuttle-0.78.5

Generation 4	Mar 15 2020 17:56:00
 + guile	2.2.7	out	/gnu/store/jgl9d4axpavsv83z2f1z1himnkbsxxqj-guile-2.2.7
--8<---------------cut here---------------end--------------->8---

guix offload test fails with a diffrent error. I also tried to use #:log-verbosity 'protocol, but it doesn't help.

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ guix offload test
guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'minion100' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: 'minion100' is running GNU Guile 3.0.1
sending 1 store item (0 MiB) to 'minion100'...
exporting path `/gnu/store/wc2vv8kcf634gijak07sadwmkck903lq-export-test'
guix offload: error: unknown error while sending files over SSH
--8<---------------cut here---------------end--------------->8---

In the meantime copy fails differently:

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ guix copy --from=minion100 hello
guix copy: error: Guile modules not found on remote host 'minion100'
hint: Make sure `GUILE_LOAD_PATH' includes Guix' own module directory.  Run `ssh minion100 env | grep GUILE_LOAD_PATH' to check.

aabramov@delta:~/factory/guix$ guix copy --to=minion100 hello
sending 1 store item (0 MiB) to 'minion100'...
guix copy: error: unknown error while sending files over SSH
aabramov@delta:~/factory/guix$ ssh minion100 env | grep GUILE_LOAD_PATH
--8<---------------cut here---------------end--------------->8---

`copy from' check gives a hint, but even though I have GUIX_PROFILE defined in my .bash_profile:

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ ssh minion100 tail -n2 .bash_profile 
export GUIX_PROFILE=~/.guix-profile
source "${GUIX_PROFILE}/etc/profile"
--8<---------------cut here---------------end--------------->8---

for some reason I still don't have any GUILE_LOAD variables defined

--8<---------------cut here---------------start------------->8---
[aabramov@minion100 ~]$ cat .guix-profile/etc/profile
# Source this file to define all the relevant environment variables in Bash
# for this profile.  You may want to define the 'GUIX_PROFILE' environment
# variable to point to the "visible" name of the profile, like this:
#
#  GUIX_PROFILE=/path/to/profile ; \
#  source /path/to/profile/etc/profile
#
# When GUIX_PROFILE is undefined, the various environment variables refer
# to this specific profile generation.

export PATH="${GUIX_PROFILE:-/gnu/store/lz99sh2a2kgcxb7wr5lf2vk9yzwb9lmm-profile}/bin${PATH:+:}$PATH"
export EMACSLOADPATH="${GUIX_PROFILE:-/gnu/store/lz99sh2a2kgcxb7wr5lf2vk9yzwb9lmm-profile}/share/emacs/site-lisp:${GUIX_PROFILE:-/gnu/store/lz99sh2a2kgcxb7wr5lf2vk9yzwb9lmm-profile}/share/emacs/27.0.50/lisp${EMACSLOADPATH:+:}$EMACSLOADPATH"
export INFOPATH="${GUIX_PROFILE:-/gnu/store/lz99sh2a2kgcxb7wr5lf2vk9yzwb9lmm-profile}/share/info${INFOPATH:+:}$INFOPATH"
--8<---------------cut here---------------end--------------->8---

OK, I saw some notes about guile-ssh and decided to install it. It seems like guix adds GUILE_LOAD vars only when you install some guile libs.

--8<---------------cut here---------------start------------->8---
[aabramov@minion100 ~]$ guix package -l
Generation 1	Mar 09 2020 22:22:03
  glibc-locales	2.29	out	/gnu/store/03nvilh2x4z07dxv7h13gh986vvgpnsf-glibc-locales-2.29

Generation 2	Mar 09 2020 22:28:46
 + emacs-next	27.0.50-0.36abf68	out	/gnu/store/61bwd5sn4s25lm2m9shbrja5d6z1d17y-emacs-next-27.0.50-0.36abf68

Generation 3	Mar 15 2020 16:54:24
 + sshuttle	0.78.5	out	/gnu/store/13s2jadhdvpk99mnkf6y1r42mamijzrd-sshuttle-0.78.5

Generation 4	Mar 15 2020 17:56:00
 + guile	2.2.7	out	/gnu/store/jgl9d4axpavsv83z2f1z1himnkbsxxqj-guile-2.2.7

Generation 5	Mar 15 2020 18:02:58	(current)
 + guile-ssh	0.12.0	out	/gnu/store/qqpigisk01ivzvb9pyi4d4d6v5p6djzw-guile-ssh-0.12.0
--8<---------------cut here---------------end--------------->8---

So now I have all the vars in place, but the copy command still complains:

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ ssh minion100 env | grep GUILE_
GUILE_LOAD_PATH=/home/aabramov/.guix-profile/share/guile/site/2.2
GUILE_LOAD_COMPILED_PATH=/home/aabramov/.guix-profile/lib/guile/2.2/site-ccache

aabramov@delta:~/factory/guix$ guix copy --from=minion100 hello
guix copy: error: Guile modules not found on remote host 'minion100'
hint: Make sure `GUILE_LOAD_PATH' includes Guix' own module directory.  Run `ssh minion100 env | grep GUILE_LOAD_PATH' to check.

aabramov@delta:~/factory/guix$ guix copy --to=minion100 hello
sending 1 store item (0 MiB) to 'minion100'...
guix copy: error: unknown error while sending files over SSH
--8<---------------cut here---------------end--------------->8---

Finally guix installation does the trick:

--8<---------------cut here---------------start------------->8---
aabramov@delta:~/factory/guix$ guix offload test
guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'minion100' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: 'minion100' is running GNU Guile 2.2.6
sending 1 store item (0 MiB) to 'minion100'...
exporting path `/gnu/store/9lj51ppm9a92yfk7jxpv4vjqpcpbcxh6-export-test'
guix offload: 'minion100' successfully imported '/gnu/store/9lj51ppm9a92yfk7jxpv4vjqpcpbcxh6-export-test'
retrieving 1 store item from 'minion100'...
guix offload: successfully imported '/gnu/store/877wz9nrnpk8zljj8gzvvlnpwlg01240-import-test' from 'minion100'
aabramov@delta:~/factory/guix$ guix copy --to=minion100 hello
sending 1 store item (0 MiB) to 'minion100'...
/gnu/store/kg9mirg6xbvzcp0a98v7326n1nvvwgsj-hello-2.10
aabramov@delta:~/factory/guix$ guix copy --from=minion100 hello
retrieving 0 store items from 'minion100'...
--8<---------------cut here---------------end--------------->8---


--
Alexey

                 reply	other threads:[~2020-03-15 18:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=84mu8higzg.fsf@mmer.org \
    --to=levenson@mmer.org \
    --cc=40082@debbugs.gnu.org \
    /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).