Large migrations over SSH continue failing despite the addition of keepalives in...
authorArt Cancro <ajc@citadel.org>
Mon, 8 Mar 2021 21:01:25 +0000 (16:01 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 8 Mar 2021 21:01:25 +0000 (16:01 -0500)
citadel/ctdlmigrate.c
citadel/modules/migrate/serv_migrate.c

index 8c0cbe071ceaf208ad0d8a24f944e36cd28cb427..10aa5104f63e6d5d3ac0e809a054c0c58626b40a 100644 (file)
@@ -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;
index 7cc8fc041fde63275598c34fd4c85e202cd5bd09..2ac3cb8ff7a7e7114d8cfa67a0024879f077112b 100644 (file)
@@ -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();