From b81ad59989b82ad977806c1a8877052eea1eb6b4 Mon Sep 17 00:00:00 2001 From: Patrice Buriez Date: Fri, 15 Feb 2019 12:54:36 +0100 Subject: Quick and ugly fix for "division by zero" Workaround for "ZeroDivisionError: float division by zero" and "RuntimeError: Unable to retrieve TSC" issues. The actual clean fix requires reworking get_data() to accumulate bytes received from PROX TCP port until EOL is received. Since the other functions calling get_data() expect a synchronous answer from PROX, timeout should be considered a fatal error, and the current default at 10ms was just calling for problems! Even if this change does not get merged, at least this workaround will be available to end-users for cherry-picking from gerrit, while the actual clean fix is being implemented. JIRA: YARDSTICK-1381 Change-Id: I6af226ca31aaebeb50302e24b1eb209de70f6526 Signed-off-by: Patrice Buriez --- yardstick/network_services/vnf_generic/vnf/prox_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yardstick') diff --git a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py index a3d0c19cd..3507315f2 100644 --- a/yardstick/network_services/vnf_generic/vnf/prox_helpers.py +++ b/yardstick/network_services/vnf_generic/vnf/prox_helpers.py @@ -347,7 +347,7 @@ class ProxSocketHelper(object): LOG.debug("Received data from socket: [%s]", ret_str) return status, ret_str - def get_data(self, pkt_dump_only=False, timeout=0.01): + def get_data(self, pkt_dump_only=False, timeout=10.0): """ read data from the socket """ # This method behaves slightly differently depending on whether it is -- cgit 1.2.3-korg