From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YGL3J/UPk2DTUQEAgWs5BA (envelope-from ) for ; Wed, 05 May 2021 23:36:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cDF3I/UPk2BgVgAAbx9fmQ (envelope-from ) for ; Wed, 05 May 2021 21:36:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A34811D72 for ; Wed, 5 May 2021 23:36:53 +0200 (CEST) Received: from localhost ([::1]:35332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lePCO-0007B9-FQ for larch@yhetil.org; Wed, 05 May 2021 17:36:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leP8g-0002G5-QA for bug-guix@gnu.org; Wed, 05 May 2021 17:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51312) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1leP8g-0008MF-Gk for bug-guix@gnu.org; Wed, 05 May 2021 17:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1leP8g-0004qy-CR for bug-guix@gnu.org; Wed, 05 May 2021 17:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48240: [PATCH 2/4] ssh: 'connect-to-remote-daemon' raises a nicer message upon error. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 05 May 2021 21:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48240 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 48240@debbugs.gnu.org Received: via spool by 48240-submit@debbugs.gnu.org id=B48240.162025034318607 (code B ref 48240); Wed, 05 May 2021 21:33:02 +0000 Received: (at 48240) by debbugs.gnu.org; 5 May 2021 21:32:23 +0000 Received: from localhost ([127.0.0.1]:34614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leP83-0004q3-2D for submit@debbugs.gnu.org; Wed, 05 May 2021 17:32:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1leP82-0004pv-4t for 48240@debbugs.gnu.org; Wed, 05 May 2021 17:32:22 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:33912) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leP7w-0007r0-QW; Wed, 05 May 2021 17:32:16 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=56410 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1leP7w-0005m1-JH; Wed, 05 May 2021 17:32:16 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 5 May 2021 23:32:03 +0200 Message-Id: <20210505213205.28519-2-ludo@gnu.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210505213205.28519-1-ludo@gnu.org> References: <87a6p9rwu7.fsf@elephly.net> <20210505213205.28519-1-ludo@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620250613; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=gaYAWe15qAZUR7Yn9+DDGlJtqMe1/dUR+OIcyNVbFUc=; b=LD7FYLPhNo6x+OZCqaznG2bXy54SZquF76XRw+ttbN+uTD4IYdUubljiL2wqZf0JsRpbDT s4zgAEYjs3BqPTD5AApLZOvJ14LhDvo30TXOF4AhpJ3f82XkQwb3mpO3shVY8F96Kurg3k zxHWw2y2aoIrj2mcWjiT+hEvJh7XX7MZXPNnDSGyB/YvwWqCkcFy66Hz2nFsKl+UfiIZlR A0VNLV3/60C3T2520UmGJssCoEgDFnkcHjwN7cgPMMFBiOeIfKylAwDuoFq8vA+X3znaXR p/b5rzgaYrqqa0Q0wtOTqWfRXZsCbGe1YIYxt3ZZrky5tSohECnIxWvbqYYy3g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620250613; a=rsa-sha256; cv=none; b=fb/z08e85aLImYXQG0TMFYfOECMTc9iGllPkMhA9bdGr4LNukjX0Ucxc2/tacAq3rnEyJM 8TV8reFe/JA2UIkLl6ELNevPtN5REyWdE+hDJHaixHCi17wguC62hA8A2AfyQJXQc/3pbw zFTFxQJTm5AGb5po6VMkUx8t5urrs2LeQLZYw4d88Dwn77GFf6i88ZTQom6aU1OQvQBwnA XGNgg6vvnruRO4/MruZw/aQ2wDikzRASDFfGLLEleajtddzHobfIwDHrxD8VYYTlSI3jc9 jrjK4x7xp2fd49hKo67EgYSkGADFHNhbU/edyZ3MzayvkZWD5XnD/aD5rryUuw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: 2.03 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 5A34811D72 X-Spam-Score: 2.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: j2jo1dSsh4Mz * 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 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