summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Li <matthew.lijun@huawei.com>2017-05-10 11:00:57 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-10 11:00:57 +0000
commit334c07d75e6a4482b0e28eb8c549b074c50870d4 (patch)
tree517c137f9c74ea28cf5bf5681f5f443341254829
parent0eea6b8b93aa4297424f9530ed0f4b25c977bee1 (diff)
parent5b5e2e6b0b26f5d938008ab640c032e6facb18b9 (diff)
Merge "Bugfix: Error when create pod.yaml file"
-rwxr-xr-xjjb/dovetail/dovetail-run.sh5
-rw-r--r--utils/create_pod_file.py2
2 files changed, 6 insertions, 1 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index 5f462e9c3..cee9e5929 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -65,6 +65,11 @@ else
fi
pod_file_dir="/home/opnfv/dovetail/userconfig"
+if [ -d ${pod_file_dir} ]; then
+ sudo rm -r ${pod_file_dir}/*
+else
+ sudo mkdir -p ${pod_file_dir}
+fi
cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} -i ${INSTALLER_IP} ${options} -f ${pod_file_dir}/pod.yaml"
echo ${cmd}
${cmd}
diff --git a/utils/create_pod_file.py b/utils/create_pod_file.py
index 7e30cc639..197e4933c 100644
--- a/utils/create_pod_file.py
+++ b/utils/create_pod_file.py
@@ -58,7 +58,7 @@ def create_file(handler):
Other installers use key file of each node.
"""
if not os.path.exists(os.path.dirname(args.filepath)):
- os.path.makedirs(os.path.dirname(args.filepath))
+ os.makedirs(os.path.dirname(args.filepath))
nodes = handler.nodes
node_list = []
index = 1