Commit bebd9ab3 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

stack/resilient: add timeout in sshd server and ssh client

parent 9f0b1c97
...@@ -236,7 +236,12 @@ class Recipe(GenericSlapRecipe, Notify, Callback): ...@@ -236,7 +236,12 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
# Create the rdiff-backup wrapper # Create the rdiff-backup wrapper
# It is useful to separate it from the notifier so that we can run it manually. # It is useful to separate it from the notifier so that we can run it manually.
remote_schema = '{ssh} -o "ConnectTimeout 300" -p %s {username}@{hostname}'.format( remote_schema = ('{ssh} '
'-o "ConnectTimeout 300" '
'-o "ServerAliveCountMax 10" '
'-o "ServerAliveInterval 30" '
'-p %s '
'{username}@{hostname}').format(
ssh=self.options['sshclient-binary'], ssh=self.options['sshclient-binary'],
username=parsed_url.username, username=parsed_url.username,
hostname=parsed_url.hostname hostname=parsed_url.hostname
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = e24d0567cda7c72e39f6c8fcb0ede7ab md5sum = 5fec0e5f892aaf06beb814e24e514cae
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
......
...@@ -172,7 +172,6 @@ config-command = $${notifier-stalled-promise-bin:wrapper-path} ...@@ -172,7 +172,6 @@ config-command = $${notifier-stalled-promise-bin:wrapper-path}
#-- #--
#-- OpenSSH. #-- OpenSSH.
[resilient-sshd-config] [resilient-sshd-config]
# XXX: Add timeout support
recipe = slapos.recipe.template recipe = slapos.recipe.template
output = $${directory:etc}/resilient-sshd.conf output = $${directory:etc}/resilient-sshd.conf
path_pid = $${directory:run}/resilient-sshd.pid path_pid = $${directory:run}/resilient-sshd.pid
...@@ -186,6 +185,8 @@ inline = ...@@ -186,6 +185,8 @@ inline =
PasswordAuthentication no PasswordAuthentication no
PubkeyAuthentication yes PubkeyAuthentication yes
ForceCommand $${rdiff-backup-server:wrapper} ForceCommand $${rdiff-backup-server:wrapper}
ClientAliveInterval 30
ClientAliveCountMax 10
[sshd-raw-server] [sshd-raw-server]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment