Skip to content

Commit

Permalink
[transport] Prevent package list for unresponsive nodes
Browse files Browse the repository at this point in the history
Raise error when _connect() returns non zero status.

Signed-off-by: Trevor Benson <trevor.benson@gmail.com>
  • Loading branch information
TrevorBenson authored and TurboTurtle committed Jan 2, 2024
1 parent c40b6b9 commit 97c8656
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sos/collector/transports/saltstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def _connect(self, password=None):
self.log_info("Transport is locally supported and service running. ")
cmd = "echo Connected"
result = self.run_command(cmd, timeout=180)
if result['status'] == 1:
raise ConnectionException(self.address)
return result['status'] == 0

def _disconnect(self):
Expand Down

0 comments on commit 97c8656

Please sign in to comment.