* bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not
@ 2020-01-31 6:50 Maxim Cournoyer
2020-02-05 11:11 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: Maxim Cournoyer @ 2020-01-31 6:50 UTC (permalink / raw)
To: 39366
"hurd" is a host name defined in my ~/.ssh/config file.
$ guix offload status
guix offload: getting status of 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: warning: machine 'hurd' is 31553985 seconds behind
load on machine 'hurd' is 0.02 (normalized: 0.02)
hurd
kernel: Linux 5.1.2-gnu
architecture: x86_64
host name: hurd
normalized load: 0.02
free disk space: 950819.34 MiB
time difference: -31553985 s
$ guix offload test
guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
guix offload: Guix is usable on 'hurd' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
guix offload: 'hurd' is running GNU Guile 2.2.4
sending 1 store item (0 MiB) to '10.42.0.199'...
exporting path `/gnu/store/s9f3igal64f8c4k23jda5z24pfpzqxv6-export-test'
guix offload: 'hurd' successfully imported '/gnu/store/s9f3igal64f8c4k23jda5z24pfpzqxv6-export-test'
retrieving 1 store item from '10.42.0.199'...
guix offload: successfully imported
'/gnu/store/y7l8zymvqcnja6ybk8lzxncf9v0r5g79-import-test' from 'hurd'
$ guix build git --no-substitutes --check
process 31348 acquired build slot '/var/guix/offload/hurd:22/0'
guix offload: error: failed to connect to 'hurd': Failed to resolve hostname hurd (Name or service not known)
waiting for locks or build slots...
So, in many cases it seems able to use the information in ~/.ssh/config
to connect with the machine, but not when actually trying to offload
builds.
Maxim
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not
2020-01-31 6:50 bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not Maxim Cournoyer
@ 2020-02-05 11:11 ` Ludovic Courtès
2021-12-16 13:39 ` zimoun
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2020-02-05 11:11 UTC (permalink / raw)
To: Maxim Cournoyer; +Cc: 39366
Hi,
Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
> "hurd" is a host name defined in my ~/.ssh/config file.
>
> $ guix offload status
> guix offload: getting status of 1 build machines defined in '/etc/guix/machines.scm'...
[...]
> $ guix offload test
> guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
> guix offload: Guix is usable on 'hurd' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
[...]
> $ guix build git --no-substitutes --check
> process 31348 acquired build slot '/var/guix/offload/hurd:22/0'
> guix offload: error: failed to connect to 'hurd': Failed to resolve hostname hurd (Name or service not known)
That is confusing indeed. It comes from the fact that ‘guix offload’ in
the last case is running as root; thus, it sees a different
~/.ssh/config.
We could instruct ‘guix offload’ to always ignore ~/.ssh/config, but
that wouldn’t be great because using it can be useful.
Perhaps it should emit a warning when not running as root?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not
2020-02-05 11:11 ` Ludovic Courtès
@ 2021-12-16 13:39 ` zimoun
2022-01-03 16:58 ` Ludovic Courtès
0 siblings, 1 reply; 5+ messages in thread
From: zimoun @ 2021-12-16 13:39 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 39366, Maxim Cournoyer
Hi,
On Wed, 05 Feb 2020 at 12:11, Ludovic Courtès <ludo@gnu.org> wrote:
> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>
>> "hurd" is a host name defined in my ~/.ssh/config file.
>>
>> $ guix offload status
>> guix offload: getting status of 1 build machines defined in '/etc/guix/machines.scm'...
>
> [...]
>
>> $ guix offload test
>> guix offload: testing 1 build machines defined in '/etc/guix/machines.scm'...
>> guix offload: Guix is usable on 'hurd' (test returned "/gnu/store/883yjkl46dxw9mzykykmbs0yzwyxm17z-test")
>
> [...]
>
>> $ guix build git --no-substitutes --check
>> process 31348 acquired build slot '/var/guix/offload/hurd:22/0'
>> guix offload: error: failed to connect to 'hurd': Failed to resolve hostname hurd (Name or service not known)
>
> That is confusing indeed. It comes from the fact that ‘guix offload’ in
> the last case is running as root; thus, it sees a different
> ~/.ssh/config.
Therefore, see 52517. :-) And the manual is also confusing, IMHO.
<http://issues.guix.gnu.org/issue/52517>
> We could instruct ‘guix offload’ to always ignore ~/.ssh/config, but
> that wouldn’t be great because using it can be useful.
Well, I am in favor of POLA.
Cheers,
simon
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not
2021-12-16 13:39 ` zimoun
@ 2022-01-03 16:58 ` Ludovic Courtès
2022-01-03 17:24 ` zimoun
0 siblings, 1 reply; 5+ messages in thread
From: Ludovic Courtès @ 2022-01-03 16:58 UTC (permalink / raw)
To: zimoun; +Cc: 39366, Maxim Cournoyer
[-- Attachment #1: Type: text/plain, Size: 708 bytes --]
Hi,
zimoun <zimon.toutoune@gmail.com> skribis:
> On Wed, 05 Feb 2020 at 12:11, Ludovic Courtès <ludo@gnu.org> wrote:
[...]
>> That is confusing indeed. It comes from the fact that ‘guix offload’ in
>> the last case is running as root; thus, it sees a different
>> ~/.ssh/config.
>
> Therefore, see 52517. :-) And the manual is also confusing, IMHO.
>
> <http://issues.guix.gnu.org/issue/52517>
>
>
>> We could instruct ‘guix offload’ to always ignore ~/.ssh/config, but
>> that wouldn’t be great because using it can be useful.
>
> Well, I am in favor of POLA.
Yeah, actually that would be in line with
bd8345777f5a48ee61656248655ebac71a09e926.
How about this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 656 bytes --]
diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index 9ddf458c13..925325ef5f 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -231,6 +231,9 @@ (define* (open-ssh-session machine #:optional max-silent-time)
;; stateless instead.
#:knownhosts "/dev/null"
+ ;; Likewise for ~/.ssh/config.
+ #:config "/dev/null"
+
;; We need lightweight compression when
;; exchanging full archives.
#:compression
[-- Attachment #3: Type: text/plain, Size: 17 bytes --]
?
Ludo’.
^ permalink raw reply related [flat|nested] 5+ messages in thread
* bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not
2022-01-03 16:58 ` Ludovic Courtès
@ 2022-01-03 17:24 ` zimoun
0 siblings, 0 replies; 5+ messages in thread
From: zimoun @ 2022-01-03 17:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 39366, Maxim Cournoyer
Hi,
On Mon, 03 Jan 2022 at 17:58, Ludovic Courtès <ludo@gnu.org> wrote:
>>> We could instruct ‘guix offload’ to always ignore ~/.ssh/config, but
>>> that wouldn’t be great because using it can be useful.
>>
>> Well, I am in favor of POLA.
>
> Yeah, actually that would be in line with
> bd8345777f5a48ee61656248655ebac71a09e926.
>
> How about this:
>
> diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
> index 9ddf458c13..925325ef5f 100644
> --- a/guix/scripts/offload.scm
> +++ b/guix/scripts/offload.scm
> @@ -231,6 +231,9 @@ (define* (open-ssh-session machine #:optional max-silent-time)
> ;; stateless instead.
> #:knownhosts "/dev/null"
>
> + ;; Likewise for ~/.ssh/config.
> + #:config "/dev/null"
> +
> ;; We need lightweight compression when
> ;; exchanging full archives.
> #:compression
I am not enough familiar with this part of code but it sounds reasonable
since it is indeed aligned with the mentioned commit
bd8345777f5a48ee61656248655ebac71a09e926. :-)
Cheers,
simon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-03 17:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-31 6:50 bug#39366: guix offload sometimes can use ~/.ssh/config, sometimes not Maxim Cournoyer
2020-02-05 11:11 ` Ludovic Courtès
2021-12-16 13:39 ` zimoun
2022-01-03 16:58 ` Ludovic Courtès
2022-01-03 17:24 ` zimoun
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).