Skip to content

Commit

Permalink
Merge pull request red-hat-storage#3898 from psathyan/tfaBVTLog
Browse files Browse the repository at this point in the history
TFA: regression issue with long_running method
  • Loading branch information
mergify[bot] authored Jul 18, 2024
2 parents 79f3df1 + 18e600d commit df4b17e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ceph/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -1518,6 +1518,7 @@ def long_running(self, **kw):

try:
channel = ssh().get_transport().open_session()
channel.settimeout(timeout)

# A mismatch between stdout and stderr streams have been observed hence
# combining the streams and logging is set to debug level only.
Expand All @@ -1542,7 +1543,7 @@ def long_running(self, **kw):
data = channel.recv(1024)

# time check - raise exception when exceeded.
if timeout is not None and _end_time > datetime.datetime.now():
if timeout and datetime.datetime.now() > _end_time:
channel.close()
raise SocketTimeoutException(
f"{cmd} failed to complete within {timeout}s"
Expand Down

0 comments on commit df4b17e

Please sign in to comment.