Skip to content

Commit

Permalink
Merge pull request #1874 from ceph/fix-fog-timeout
Browse files Browse the repository at this point in the history
fog: Fix a connection timeout bug
  • Loading branch information
dmick authored Jul 27, 2023
2 parents 4b6fd6f + 287403d commit 3117e89
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions teuthology/orchestra/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def ensure_online(self):
return
self.connect()
if not self.is_online:
raise Exception('unable to connect')
raise ConnectionError(f'Failed to connect to {self.shortname}')

@property
def system_type(self):
Expand Down Expand Up @@ -518,7 +518,7 @@ def run(self, **kwargs):
not self.ssh.get_transport() or \
not self.ssh.get_transport().is_active():
if not self.reconnect():
raise Exception(f'Cannot connect to remote host {self.shortname}')
raise ConnectionError(f'Failed to reconnect to {self.shortname}')
r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
r.remote = self
return r
Expand Down
2 changes: 1 addition & 1 deletion teuthology/provision/fog.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _wait_for_ready(self):
self.remote.run(args=cmd, timeout=600)
break
except (
ConnectionResetError,
ConnectionError,
EOFError,
) as e:
log.error(f"{e} on {self.shortname}")
Expand Down

0 comments on commit 3117e89

Please sign in to comment.