facebook / openbmc

OpenBMC is an open software framework to build a complete Linux image for a Board Management Controller (BMC).
633 stars 277 forks source link

circleci: Increase QEMU SSH banner timeout #176

Closed peterdelevoryas closed 2 years ago

peterdelevoryas commented 2 years ago

Summary: We keep getting these errors where the SSH banner fails to appear:

qemu started, checking SSH connection..
Exception (client): Error reading SSH protocol banner
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/paramiko/transport.py", line 2270, in _check_banner
    buf = self.packetizer.readline(timeout)
  File "/usr/local/lib/python3.8/dist-packages/paramiko/packet.py", line 380, in readline
    buf += self._read_timeout(timeout)
  File "/usr/local/lib/python3.8/dist-packages/paramiko/packet.py", line 622, in _read_timeout
    raise socket.timeout()
socket.timeout

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/paramiko/transport.py", line 2093, in run
    self._check_banner()
  File "/usr/local/lib/python3.8/dist-packages/paramiko/transport.py", line 2274, in _check_banner
    raise SSHException(
paramiko.ssh_exception.SSHException: Error reading SSH protocol banner

According to StackOverflow, this is likely because sshd is not responding with the banner message quickly enough. It's hard to tell, because it's not particularly reproducible. I'm attempting to resolve it by increasing the banner timeout. The existing mechanism does not help in this case.

Test Plan: Looking at CircleCI results.

facebook-github-bot commented 2 years ago

@peterdelevoryas has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.