Subject: bug#39925: `guix pull` failure in multi-machine setup

From: Ludovic Courtès <[email-masked]>
Date: Sun, 08 Mar 2020 12:40:33 +0100

Hi,

Lars-Dominik Braun <[email-masked]> skribis:

>> Sounds like this ssh URI is not valid on the nodes, is that right?
> I would consider it valid, since `ssh master.<domain>` and `guix build
> <package>` both work just fine from the nodes. It’s just `guix pull`, which is
> causing issues.

Oh it may be that we would also need to let ‘HOME’ through, so that
~/.ssh/config is found, for example.  That could have undesirable side
effects that are best avoided, though (e.g., ~/.cache/guile would become
visible.)

>> Right.  So perhaps I don’t quite understand the use case.  What about
>> simply pulling from one of these machines, if everything is shared over
>> NFS?
> Sure, that’s an option, but anyone who tries will get a strange error message.

I agree that the error message is sub-optimal.  Not sure how to improve
on it (how can ‘build-self.scm’ know that it’s failing because of
that?).

> And it breaks the appeal of having a remote guix daemon in the first place,
> that is being able to run `guix <whatever>` on any machine I log into. If that
> is not the case (i.e. not for `guix pull`) it would be more consistent to ask
> users to SSH into a different machine every time they interact with guix. Does
> that explain my use case?

Instead of:

  GUIX_DAEMON_SOCKET=ssh://host guix pull

You could run:

  ssh host guix pull

In fact, the former would probably not work because ‘guix pull’ modifies
the local /var/guix/profiles, not the one on the host that runs the
daemon.

So maybe the problem is that ‘GUIX_DAEMON_SOCKET=ssh://’ isn’t quite as
powerful as you thought.  :-)  It’s really just a way to talk to a remote
daemon, but ‘guix pull’, ‘guix package’, etc. also need to access
/var/guix/profiles.

Thanks,
Ludo’.