This is an automated email from the ASF dual-hosted git repository. tomaz pushed a commit to branch 2.8.x in repository https://gitbox.apache.org/repos/asf/libcloud.git
commit 6be9aa552aef5d66c0aaf158cd6acf886ee24219 Author: Tomaz Muraus <[email protected]> AuthorDate: Wed Apr 1 12:28:08 2020 +0200 Make sure we don't retry SSHCommandTimeoutError exception in deploy_node() since it's fatal. --- libcloud/compute/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcloud/compute/base.py b/libcloud/compute/base.py index 5ccad79..d190c47 100644 --- a/libcloud/compute/base.py +++ b/libcloud/compute/base.py @@ -54,6 +54,7 @@ from libcloud.common.base import ConnectionKey from libcloud.common.base import BaseDriver from libcloud.common.types import LibcloudError from libcloud.compute.ssh import have_paramiko +from libcloud.compute.ssh import SSHCommandTimeoutError from libcloud.utils.networking import is_private_subnet from libcloud.utils.networking import is_valid_ip_address @@ -1819,6 +1820,9 @@ class NodeDriver(BaseDriver): while tries < max_tries: try: node = task.run(node, ssh_client) + except SSHCommandTimeoutError as e: + # Command timeout exception is fatal so we don't retry it. + raise e except Exception as e: tries += 1
