Skip to content

Commit 813a48d

Browse files
fix(ci): e2e nested bootstrap cluster add d8 v ssh timeout (#2301)
Description Add SSH keepalive options to d8 v ssh calls used in nested-cluster CI and the e2e d8 helper. This keeps long-lived SSH sessions more stable when the VM connection is proxied through virtualization-api port-forwarding. The following SSH options were added: ServerAliveInterval=15 to send periodic keepalive probes during long-running sessions. ServerAliveCountMax=8 to tolerate short interruptions before the SSH client gives up. ConnectTimeout=10 to fail stalled connection attempts quickly and avoid hanging retries. --------- Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
1 parent bc0eae4 commit 813a48d

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/e2e-reusable-pipeline.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,9 @@ jobs:
316316
--local-ssh=true \
317317
--local-ssh-opts="-o StrictHostKeyChecking=no" \
318318
--local-ssh-opts="-o UserKnownHostsFile=/dev/null" \
319+
--local-ssh-opts="-o ServerAliveInterval=15" \
320+
--local-ssh-opts="-o ServerAliveCountMax=8" \
321+
--local-ssh-opts="-o ConnectTimeout=10" \
319322
${DEFAULT_USER}@${host}.${NAMESPACE} \
320323
-c "$cmd"
321324
}
@@ -363,6 +366,9 @@ jobs:
363366
--local-ssh=true \
364367
--local-ssh-opts="-o StrictHostKeyChecking=no" \
365368
--local-ssh-opts="-o UserKnownHostsFile=/dev/null" \
369+
--local-ssh-opts="-o ServerAliveInterval=15" \
370+
--local-ssh-opts="-o ServerAliveCountMax=8" \
371+
--local-ssh-opts="-o ConnectTimeout=10" \
366372
${DEFAULT_USER}@${nested_master}.${NAMESPACE} \
367373
-c "$cmd"
368374
}

test/e2e/internal/d8/d8.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (v D8VirtualizationCMD) SSHCommand(vmName, command string, opts SSHOptions)
101101
}
102102

103103
localSSHOpts := "--local-ssh-opts='-o StrictHostKeyChecking=no' --local-ssh-opts='-o UserKnownHostsFile=/dev/null' --local-ssh-opts='-o LogLevel=ERROR'"
104-
localSSHOpts = fmt.Sprintf("%s --local-ssh-opts='-o ConnectTimeout=%s'", localSSHOpts, timeout.String())
104+
localSSHOpts = fmt.Sprintf("%s --local-ssh-opts='-o ServerAliveInterval=15' --local-ssh-opts='-o ServerAliveCountMax=8' --local-ssh-opts='-o ConnectTimeout=10'", localSSHOpts)
105105

106106
cmd := fmt.Sprintf("%s ssh %s -c '%s' --local-ssh=true %s", v.cmd, vmName, command, localSSHOpts)
107107
cmd = v.addNamespace(cmd, opts.Namespace)

0 commit comments

Comments
 (0)