From: "Ludovic Courtès" <ludo@gnu.org>
To: 48240@debbugs.gnu.org
Subject: bug#48240: [PATCH 2/4] ssh: 'connect-to-remote-daemon' raises a nicer message upon error.
Date: Wed, 5 May 2021 23:32:03 +0200 [thread overview]
Message-ID: <20210505213205.28519-2-ludo@gnu.org> (raw)
In-Reply-To: <20210505213205.28519-1-ludo@gnu.org>
* guix/ssh.scm (connect-to-remote-daemon): Catch
'store-connection-error?' and rethrow.
---
guix/ssh.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/guix/ssh.scm b/guix/ssh.scm
index 457d1890f9..b39b90f733 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -302,8 +302,13 @@ EXP never returns or calls 'primitive-exit' when it's done."
"/var/guix/daemon-socket/socket"))
"Connect to the remote build daemon listening on SOCKET-NAME over SESSION,
an SSH session. Return a <store-connection> object."
- (open-connection #:port (remote-daemon-channel session socket-name)))
-
+ (guard (c ((store-connection-error? c)
+ ;; Raise a more focused error condition.
+ (raise (formatted-message
+ (G_ "failed to connect over SSH to daemon at '~a', socket ~a")
+ (session-get session 'host)
+ socket-name))))
+ (open-connection #:port (remote-daemon-channel session socket-name))))
(define (store-import-channel session)
"Return an output port to which archives to be exported to SESSION's store
--
2.31.1
next prev parent reply other threads:[~2021-05-05 21:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 16:04 bug#48240: “guix copy” to host with daemon listening on TCP fails Ricardo Wurmus
2021-05-05 21:32 ` bug#48240: [PATCH 1/4] store: 'open-connection' never returns #f Ludovic Courtès
2021-05-05 21:32 ` Ludovic Courtès [this message]
2021-05-05 21:32 ` bug#48240: [PATCH 3/4] store: Export 'connect-to-daemon' Ludovic Courtès
2021-05-05 21:32 ` bug#48240: [PATCH 4/4] ssh: Honor GUIX_DAEMON_SOCKET on the target machine Ludovic Courtès
2021-05-08 13:10 ` bug#48240: “guix copy” to host with daemon listening on TCP fails Ludovic Courtès
2021-05-11 8:43 ` bug#48240: “guix_ " Simon Streit
2021-05-11 9:56 ` bug#48240: “guix " Ludovic Courtès
2021-05-12 7:48 ` Simon Streit
2021-05-11 10:52 ` Ludovic Courtès
2021-05-11 14:01 ` Bone Baboon via Bug reports for GNU Guix
2021-05-11 21:22 ` Ludovic Courtès
2021-05-12 7:49 ` Simon Streit
2021-05-12 19:44 ` Simon Streit
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=20210505213205.28519-2-ludo@gnu.org \
--to=ludo@gnu.org \
--cc=48240@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).