summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQiLiang <liangqi1@huawei.com>2016-05-24 15:18:27 +0800
committerQiLiang <liangqi1@huawei.com>2016-05-24 15:21:47 +0800
commit115f9bf5de5b3aea2f7f3afe4527f10d399ca0cf (patch)
tree9fcd7871f0d0c2a86fc7e388597c3927d7fc567f
parent0ed4e93eb256c60a326d233dbf3259e123caf2d1 (diff)
Dump anslible log from defined path
JIRA: COMPASS-394 Change-Id: I40dd709e0f365af80c3a2dfb487073d925f2ea77 Signed-off-by: QiLiang <liangqi1@huawei.com>
-rw-r--r--deploy/client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/deploy/client.py b/deploy/client.py
index a87decc9..8617a56a 100644
--- a/deploy/client.py
+++ b/deploy/client.py
@@ -913,7 +913,8 @@ class CompassClient(object):
def print_ansible_log():
os.system("ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i %s root@192.168.200.2 \
- 'while ! tail -f /var/ansible/run/openstack_liberty-opnfv2/ansible.log 2>/dev/null; do :; sleep 1; done'" % CONF.rsa_file)
+ 'while ! tail -f /var/ansible/run/%s-%s/ansible.log 2>/dev/null; do :; sleep 1; done'" %
+ (CONF.rsa_file, CONF.adapter_name, CONF.cluster_name))
def kill_print_proc():
os.system("ps aux|grep -v grep|grep -E 'ssh.+root@192.168.200.2'|awk '{print $2}'|xargs kill -9")