From 93c5f6bb1d3dee16688b9b147e88007bc3dfabaa Mon Sep 17 00:00:00 2001 From: DanielMartinBuckley Date: Thu, 17 Jan 2019 14:50:46 +0000 Subject: Debugging information when dpdk bind fails should be improved JIRA: YARDSTICK-1585 When dpdk-devbind.py is failing, the information provided is poor, making it difficult to debug. At least the exact command used should be printed, ideally with the returned error. As of today, the more interesting line is DpdkBindHelperException: /opt/nsb_bin/dpdk-devbind.py command failed with rc=1 Change-Id: I7831c81ffa9e1f4695480eb140fa97a58ff88f8c Signed-off-by: Daniel Martin Buckley --- yardstick/network_services/helpers/dpdkbindnic_helper.py | 1 + yardstick/network_services/vnf_generic/vnf/sample_vnf.py | 3 +++ yardstick/ssh.py | 2 ++ 3 files changed, 6 insertions(+) (limited to 'yardstick') diff --git a/yardstick/network_services/helpers/dpdkbindnic_helper.py b/yardstick/network_services/helpers/dpdkbindnic_helper.py index 1c74355ef..0fc63f88d 100644 --- a/yardstick/network_services/helpers/dpdkbindnic_helper.py +++ b/yardstick/network_services/helpers/dpdkbindnic_helper.py @@ -284,6 +284,7 @@ printf "%s/driver:" $1 ; basename $(readlink -s $1/device/driver); } \ res = self.ssh_helper.execute(*args, **kwargs) if res[0] != 0: template = '{} command failed with rc={}' + LOG.critical("DPDK_DEVBIND Failure %s", res[1]) raise DpdkBindHelperException(template.format(self.dpdk_devbind, res[0])) return res diff --git a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py index aec085057..b0445238d 100644 --- a/yardstick/network_services/vnf_generic/vnf/sample_vnf.py +++ b/yardstick/network_services/vnf_generic/vnf/sample_vnf.py @@ -231,6 +231,9 @@ class DpdkVnfSetupEnvHelper(SetupEnvHelper): exit_status = self.dpdk_bind_helper.check_dpdk_driver() if exit_status == 0: return + else: + LOG.critical("DPDK Driver not installed") + return def _setup_resources(self): # what is this magic? how do we know which socket is for which port? diff --git a/yardstick/ssh.py b/yardstick/ssh.py index 438e8158b..6bc6010f7 100644 --- a/yardstick/ssh.py +++ b/yardstick/ssh.py @@ -80,6 +80,7 @@ from yardstick.common import exceptions from yardstick.common.utils import try_int, NON_NONE_DEFAULT, make_dict_from_map from yardstick.network_services.utils import provision_tool +LOG = logging.getLogger(__name__) def convert_key_to_str(key): if not isinstance(key, (paramiko.RSAKey, paramiko.DSSKey)): @@ -337,6 +338,7 @@ class SSH(object): details = fmt % {"cmd": cmd, "status": exit_status} if stderr_data: details += " Last stderr data: '%s'." % stderr_data + LOG.critical("PROX ERROR: %s", details) raise exceptions.SSHError(error_msg=details) return exit_status -- cgit 1.2.3-korg