Skip to content
Snippets Groups Projects
Commit 1281b54f authored by Chris Hines's avatar Chris Hines
Browse files

log ctrlmaster error messages

parent a3182dfa
No related branches found
No related tags found
3 merge requests!77Revert "disable agressive kill and restart",!45Test,!44Dev
Pipeline #11903 passed
...@@ -116,6 +116,9 @@ class Ssh: ...@@ -116,6 +116,9 @@ class Ssh:
# I an existing control process is recoreded, but we are starting a new one, try to delete the old one # I an existing control process is recoreded, but we are starting a new one, try to delete the old one
if ctrlsocket in sess.ctrl_processes: if ctrlsocket in sess.ctrl_processes:
try: try:
(stderr,stdout) = sess.ctrl_processes[ctrlsocket].communicate()
logger.error("control master terminated with stderr {}".format(stderr))
logger.error("control master terminated with stdout {}".format(stdout))
os.killpg(int(sess.ctrl_processes[ctrlsocket].pid),signal.SIGKILL) os.killpg(int(sess.ctrl_processes[ctrlsocket].pid),signal.SIGKILL)
except: except:
pass pass
...@@ -123,7 +126,7 @@ class Ssh: ...@@ -123,7 +126,7 @@ class Ssh:
sshcmd = Ssh.SSHCMDWITHOPTS.copy() sshcmd = Ssh.SSHCMDWITHOPTS.copy()
sshcmd.extend([ sshcmd.extend([
"-S", ctrlsocket, "-S", ctrlsocket,
"-M", '-o', 'ControlPersist=10s', "-M", '-o', 'ControlPersist=60s',
'-p', sshport, '-N','-l', user, host]) '-p', sshport, '-N','-l', user, host])
env = os.environ.copy() env = os.environ.copy()
if sess.socket is None: if sess.socket is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment