aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-04-26 18:30:33 +0000
committerGerrit Code Review <gerrit@lix>2024-04-26 18:30:33 +0000
commit8773439a85ef281f4da0cbf0d26b125bbe7a222a (patch)
treedb90792c82888d8116162e687e9c427dc4fc214e /src
parent789aa39576a3c45ab63278cd01e1538c27e1ce9f (diff)
parent104448e75d87d03d2fb0b4ac96d4da72e1dae50d (diff)
Merge "ssh-ng: Set log-fd for ssh to `4` by default" into main
Diffstat (limited to 'src')
-rw-r--r--src/libstore/machines.cc2
-rw-r--r--src/libstore/ssh-store.cc7
2 files changed, 7 insertions, 2 deletions
diff --git a/src/libstore/machines.cc b/src/libstore/machines.cc
index ecae3054e..700c9b3dd 100644
--- a/src/libstore/machines.cc
+++ b/src/libstore/machines.cc
@@ -69,10 +69,10 @@ ref<Store> Machine::openStore() const
Store::Params storeParams;
if (storeUri.starts_with("ssh://")) {
storeParams["max-connections"] = "1";
- storeParams["log-fd"] = "4";
}
if (storeUri.starts_with("ssh://") || storeUri.starts_with("ssh-ng://")) {
+ storeParams["log-fd"] = "4";
if (sshKey != "")
storeParams["ssh-key"] = sshKey;
if (sshPublicHostKey != "")
diff --git a/src/libstore/ssh-store.cc b/src/libstore/ssh-store.cc
index 4a6aad449..80d10eb0f 100644
--- a/src/libstore/ssh-store.cc
+++ b/src/libstore/ssh-store.cc
@@ -32,6 +32,10 @@ struct SSHStoreConfig : virtual RemoteStoreConfig, virtual CommonSSHStoreConfig
class SSHStore : public virtual SSHStoreConfig, public virtual RemoteStore
{
public:
+ // Hack for getting remote build log output.
+ // Intentionally not in `SSHStoreConfig` so that it doesn't appear in
+ // the documentation
+ const Setting<int> logFD{(StoreConfig*) this, -1, "log-fd", "file descriptor to which SSH's stderr is connected"};
SSHStore(const std::string & scheme, const std::string & host, const Params & params)
: StoreConfig(params)
@@ -47,7 +51,8 @@ public:
sshPublicHostKey,
// Use SSH master only if using more than 1 connection.
connections->capacity() > 1,
- compress)
+ compress,
+ logFD)
{
}