Comment 45 for bug 1253896

Revision history for this message
Valerii Zhelezniakov (vzhelezniakov) wrote :

Hi,

I investigated this issue and found still one place where timeout should be expanded.
It is hardcoded constant 'self.banner_timeout = 15' in /usr/local/lib/python2.7/dist-packages/paramiko/transport.py
I offer to increase this value or make it configurable.

Description:
As I see in logs http://logs.openstack.org/84/58284/2/check/check-tempest-devstack-vm-full/a2ce10a/testr_results.html.gz
The message 'Error reading SSH protocol banner' indicates the main problem.
If we look at in the sources of 'paramiko' we can see that, before starting data exchange, the worker thread check banner.

Banner checking is performed by writing data to packetizer and then reading answer from it.

 /usr/local/lib/python2.7/dist-packages/paramiko/transport.py
1530 def run(self):
                ...
                self.packetizer.write_all(self.local_version + '\r\n')
                self._check_banner()
                ...

where 'packetizer' is connection provider as I understood.
1669 def _check_banner(self):
         ...
         timeout = self.banner_timeout
         ...
         try:
                buf = self.packetizer.readline(timeout)
            except ProxyCommandFailure:
                raise
            except Exception, x:
                raise SSHException('Error reading SSH protocol banner' + str(x))

As we can see, initial value for timeout is 15 seconds, and it is too low for tempest.