From 6f7143796defed37742bd525df9c5b8e10912709 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 8 Mar 2021 16:01:25 -0500 Subject: [PATCH] Large migrations over SSH continue failing despite the addition of keepalives in the control channel. Permitting export over TCP to see if it fares better on our own protocol. --- citadel/ctdlmigrate.c | 4 ++-- citadel/modules/migrate/serv_migrate.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/citadel/ctdlmigrate.c b/citadel/ctdlmigrate.c index 8c0cbe071..10aa5104f 100644 --- a/citadel/ctdlmigrate.c +++ b/citadel/ctdlmigrate.c @@ -305,7 +305,7 @@ int main(int argc, char *argv[]) { sprintf(socket_path, "/tmp/ctdlmigrate-socket.%ld.%d", time(NULL), getpid()); unlink(socket_path); - snprintf(cmd, sizeof cmd, "ssh -MNf -S %s -l %s %s", socket_path, remote_user, remote_host); + snprintf(cmd, sizeof cmd, "ssh -MNf -o ServerAliveInterval=5 -S %s -l %s %s", socket_path, remote_user, remote_host); sshpid = fork(); if (sshpid < 0) { printf("%s\n", strerror(errno)); @@ -372,7 +372,7 @@ int main(int argc, char *argv[]) { "\n", remote_host ); - snprintf(cmd, sizeof cmd, "ssh -S %s %s@%s %s -w3600 MIGR export", socket_path, remote_user, remote_host, remote_sendcommand); + snprintf(cmd, sizeof cmd, "ssh -o ServerAliveInterval=5 -S %s %s@%s %s -w3600 MIGR export", socket_path, remote_user, remote_host, remote_sendcommand); sourcefp = popen(cmd, "r"); if (!sourcefp) { cmdexit = errno; diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index 7cc8fc041..2ac3cb8ff 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -1103,7 +1103,7 @@ void migr_do_restore_meta(void) { void cmd_migr(char *cmdbuf) { char cmd[32]; - if (CtdlAccessCheck(ac_internal)) return; + if (CtdlAccessCheck(ac_aide)) return; if (CtdlTrySingleUser()) { CtdlDisableHouseKeeping(); -- 2.30.2