From 8404a1f66d090c5d68d8c5e958316df7d286a1e2 Mon Sep 17 00:00:00 2001 From: Raito Bezarius Date: Fri, 10 May 2024 19:54:42 +0200 Subject: [PATCH] feat(libstore): print the first line of stdout of SSH in case of failure In case of failure to connect as can be seen in https://buildbot.lix.systems/#/builders/39/builds/1386/steps/1/logs/stdio It is difficult to understand what happened, if we enabled the talkative verbose level, we could learn about the first line SSH sent us. In practice, this is not workable, we can just make it warn all the time. Change-Id: Iaaf56894060a58f2dfc78254bb60b1c43482f9bb Signed-off-by: Raito Bezarius --- src/libstore/ssh.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libstore/ssh.cc b/src/libstore/ssh.cc index 2d2c24afa..87414fe9c 100644 --- a/src/libstore/ssh.cc +++ b/src/libstore/ssh.cc @@ -110,7 +110,7 @@ std::unique_ptr SSHMaster::startCommand(const std::string } catch (EndOfFile & e) { } if (reply != "started") { - printTalkative("SSH stdout first line: %s", reply); + warn("SSH to '%s' failed, stdout first line: '%s'", host, reply); throw Error("failed to start SSH connection to '%s'", host); } }