The _get_ssh_connection in retries to connect without a sleep

Bug #1180213 reported by Andrea Frittoli
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Andrea Frittoli

Bug Description

The code in _get_ssh_connection in retries to connect without a sleep in case of socket error.

This can cause a SYN attack.
The retries shall be implemented as an exponential back-off.

    def _get_ssh_connection(self):
        """Returns an ssh connection to the specified host."""
        _timeout = True

        while not self._is_timed_out(self.timeout, _start_time):
                ssh.connect(, username=self.username,
                            timeout=self.timeout, pkey=self.pkey)
                _timeout = False
            except socket.error:
            except paramiko.AuthenticationException:

Revision history for this message
Attila Fazekas (afazekas) wrote :

By just single tempest process probably we will not kill a system, but it cause a lot of unnecessary stress anyway.

Changed in tempest:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

Fix proposed to branch: master

Changed in tempest:
assignee: nobody → Andrea Frittoli (andrea-frittoli)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Submitter: Jenkins
Branch: master

commit 334f1fdf581f1a77ac4ee3990997d9ddb550280c
Author: Andrea Frittoli <email address hidden>
Date: Wed May 15 06:57:43 2013 +0100

    Add a sleep with back-off to retries

    The current implementation retries on socket error
    without a sleep, and on auth error with a fixed
    interval sleep. Replacing all with an exp backoff.
    Default sleep time set to 1.5, default backoff 1.01.

    Fixes bug #1180213
    Change-Id: I764f2aa4f2c0f8e04718d69b842a574db7aca936

Changed in tempest:
status: In Progress → Fix Released
Sean Dague (sdague)
Changed in tempest:
milestone: none → havana-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.