aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2021-03-19 14:01:52 +0100
committerVratko Polak <vrpolak@cisco.com>2021-03-19 14:01:52 +0100
commit533ce0def99dc776f5a2b9075aaabea000c2dc89 (patch)
treef01e2ccef69e236389449bd13f8742969703dd41
parent500dba02e62ba24f94972a0ef8f023418a7eee09 (diff)
FrameworkSetup: Detect socket.timeout
Otherwise setup "passes" leading to confusing errors later. Example: https://logs.fd.io/production/vex-yul-rot-jenkins-1/csit-vpp-perf-mrr-daily-master-2n-skx/1251/archives/log.html.gz#s1-s1-s1-k1-k2 Change-Id: I56b14e2eb75679c7c10b00b3f9c6bf07902e5166 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
-rw-r--r--resources/libraries/python/SetupFramework.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/resources/libraries/python/SetupFramework.py b/resources/libraries/python/SetupFramework.py
index 6df6f0dbd5..7e3b36cc77 100644
--- a/resources/libraries/python/SetupFramework.py
+++ b/resources/libraries/python/SetupFramework.py
@@ -17,6 +17,7 @@ supposed to end up here.
"""
from os import environ, remove
+import socket # For catching socket.timeout.
from tempfile import NamedTemporaryFile
import threading
@@ -158,7 +159,7 @@ def setup_node(node, tarball, remote_tarball, results=None):
extract_tarball_at_node(remote_tarball, node)
if node[u"type"] == NodeType.TG:
create_env_directory_at_node(node)
- except RuntimeError as exc:
+ except (RuntimeError, socket.timeout) as exc:
logger.console(
f"Node {node[u'type']} host {node[u'host']}, port {node[u'port']} "
f"setup failed, error: {exc!r}"
@@ -271,7 +272,7 @@ class SetupFramework:
threads.append(thread)
logger.info(
- f"Executing node setups in parallel, waiting for threads to end"
+ u"Executing node setups in parallel, waiting for threads to end."
)
for thread in threads: