eoptasks: do not try disabling ssh connection sharing

Whatever the command line options connection sharing configured in
~/.ssh/config stays somehow active, and cause errors.

Ansible has custom code to detect the situation and automatically
restart a SSH connection (see AnsibleControlPersistBrokenPipeError usage
in lib/ansible/plugins/connection/ssh.py, also relevant is bug#16731).

The only reliable fix is thus to change ~/.ssh/config to limit
connection sharing to apply to some hosts only.
This commit is contained in:
Frédéric Péters 2019-01-08 13:32:44 +01:00
parent 5916e4a986
commit 5e506bcbd4
1 changed files with 1 additions and 2 deletions

View File

@ -220,8 +220,7 @@ def command_window(args):
orig_cmd = cmd
while True:
# -t: force a tty for interactive commands.
# -S none: disable connection sharing as it proved unreliable.
rc = subprocess.call(['ssh', '-t', '-o', 'ControlMaster=no', '-S', 'none', args.command_server_name] + [cmd])
rc = subprocess.call(['ssh', '-t', args.command_server_name] + [cmd])
if rc == 0:
send_status_message(tmux_session_name,
{'@type': 'server-result',