desc='Default timeout applied to cephadm commands run directly on '
'the host (in seconds)'
),
+ Option(
+ 'ssh_keepalive_interval',
+ type='int',
+ default=7,
+ desc='How often ssh connections are checked for liveness'
+ ),
+ Option(
+ 'ssh_keepalive_count_max',
+ type='int',
+ default=3,
+ desc='How many times ssh connections can fail liveness checks '
+ 'before the host is marked offline'
+ ),
Option(
'cephadm_log_destination',
type='str',
self.default_cephadm_command_timeout = 0
self.cephadm_log_destination = ''
self.oob_default_addr = ''
+ self.ssh_keepalive_interval = 0
+ self.ssh_keepalive_count_max = 0
self.notify(NotifyType.mon_map, None)
self.config_notify()
with self.redirect_log(host, addr):
try:
ssh_options = asyncssh.SSHClientConnectionOptions(
- keepalive_interval=7, keepalive_count_max=3)
+ keepalive_interval=self.mgr.ssh_keepalive_interval,
+ keepalive_count_max=self.mgr.ssh_keepalive_count_max
+ )
conn = await asyncssh.connect(addr, username=self.mgr.ssh_user, client_keys=[self.mgr.tkey.name],
known_hosts=None, config=[self.mgr.ssh_config_fname],
preferred_auth=['publickey'], options=ssh_options)