From 35095c89b3a848a7f1029e89648c66341397c37c Mon Sep 17 00:00:00 2001 From: Zhijiang Hu Date: Thu, 9 Nov 2017 21:45:20 -0500 Subject: [PATCH] Direct prepare.sh log into log file Also remove ansible/python2-docker installation from prepare.sh as it is useless for target node. Change-Id: I90ae9a34f6319bb418aeabdc70405e14b48ed893 Signed-off-by: Zhijiang Hu --- backend/kolla/prepare.sh | 3 --- code/daisy/daisy/api/backends/kolla/install.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/kolla/prepare.sh b/backend/kolla/prepare.sh index 8ad11f61..6a653bd5 100755 --- a/backend/kolla/prepare.sh +++ b/backend/kolla/prepare.sh @@ -30,7 +30,6 @@ echo -e "[Service]\nMountFlags=shared\nEnvironmentFile=/etc/sysconfig/docker\nEx systemctl daemon-reload systemctl restart docker systemctl enable docker -yum install -y python2-docker yum -y install ntp systemctl enable ntpd.service @@ -47,8 +46,6 @@ chkconfig network on systemctl disable firewalld systemctl stop firewalld -yum -y install ansible - # multicast related prepare_dir=$(dirname $(readlink -f "$0")) yum install -y $prepare_dir/daisy4nfv-jasmine*.rpm diff --git a/code/daisy/daisy/api/backends/kolla/install.py b/code/daisy/daisy/api/backends/kolla/install.py index 4ec8e76a..0c70eb33 100755 --- a/code/daisy/daisy/api/backends/kolla/install.py +++ b/code/daisy/daisy/api/backends/kolla/install.py @@ -323,7 +323,7 @@ def _thread_bin(req, cluster_id, host, root_passwd, fp, host_name_ip_list, 'ssh -o StrictHostKeyChecking=' 'no %s %s/prepare.sh %s' % (host_ip, host_prepare_file, docker_registry_ip), - shell=True, stderr=subprocess.STDOUT) + shell=True, stdout=fp, stderr=fp) except subprocess.CalledProcessError as e: message = "exec prepare.sh on %s failed!", host_ip LOG.error(message)