From a2ea88b923adba8f6fa0fc5ad92e6ce5e72db775 Mon Sep 17 00:00:00 2001 From: xudan Date: Fri, 3 Mar 2017 03:48:11 +0000 Subject: dovetail tool: Bugfix about the prepare_env of yardstick and get the yardstick.log 1. For Fuel, yardstick prepare_env.sh will fail when pwd != /home/opnfv/repos/yardstick 2. Modify yardstick_config.yml in Dovetail to change pwd to that path. 3. Use log file /tmp/yardstick/yardstick.log created by cmd "yardstick task start" rather than redirecting the console output to yardstick.log. JIRA: DOVETAIL-363 Change-Id: Ie0475cfabc66e342be868f0924a5fccd6fa74b58 Signed-off-by: xudan --- dovetail/container.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dovetail/container.py') diff --git a/dovetail/container.py b/dovetail/container.py index 4f6975fc..4889e51e 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -59,8 +59,11 @@ class Container(object): result_volume = ' -v %s:%s ' % (dovetail_config['result_dir'], dovetail_config[type]['result']['dir']) - cmd = 'sudo docker run %s %s %s %s %s %s /bin/bash' % \ - (opts, envs, sshkey, openrc, result_volume, docker_image) + log_volume = ' -v %s:%s ' % (dovetail_config['result_dir'], + dovetail_config[type]['result']['log']) + cmd = 'sudo docker run %s %s %s %s %s %s %s /bin/bash' % \ + (opts, envs, sshkey, openrc, result_volume, + log_volume, docker_image) dt_utils.exec_cmd(cmd, cls.logger) ret, container_id = \ dt_utils.exec_cmd("sudo docker ps | grep " + docker_image + -- cgit 1.2.3-korg