Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fog: Fix a connection timeout bug #1874

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading