Skip to content

Commit

Permalink
fabtests/pytest: add a new ssh connection error pattern
Browse files Browse the repository at this point in the history
Same as title

Signed-off-by: Wenduo Wang <[email protected]>
  • Loading branch information
wenduwan authored and a-szegel committed Dec 27, 2023
1 parent d9b65d0 commit 1d76026
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fabtests/pytest/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import json
import errno
import os
import re
import subprocess
import functools
from subprocess import Popen, TimeoutExpired, run
Expand All @@ -27,10 +28,11 @@ def is_ssh_connection_error(exception):
def has_ssh_connection_err_msg(output):
err_msgs = ["Connection closed by remote host",
"Connection reset by peer",
"Connection refused"]
"Connection refused",
r"ssh_dispatch_run_fatal: .* incorrect signature"]

for msg in err_msgs:
if output.find(msg) != -1:
if len(re.findall(msg, output)) > 0:
return True

return False
Expand Down

0 comments on commit 1d76026

Please sign in to comment.