summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJun Li <lijun_1203@126.com>2017-11-23 01:18:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-23 01:18:54 +0000
commit65994e71107f60acd92a16f0fe59db0125d2491a (patch)
tree4d4d2d7cfff02b89fae270513707e42de0d7110a
parentf07b01d1adcac6bc18d71c43755b943ce8222b8c (diff)
parent945a4802c9ff00b0b5cbd2a04f3f17e40e158b82 (diff)
Merge "Bugfix: HA failed on Compass master because of lacking pod.yaml"
-rwxr-xr-xjjb/dovetail/dovetail-run.sh66
1 files changed, 40 insertions, 26 deletions
diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh
index 2cbb94766..35a61f23b 100755
--- a/jjb/dovetail/dovetail-run.sh
+++ b/jjb/dovetail/dovetail-run.sh
@@ -69,37 +69,51 @@ else
exit 1
fi
-set +e
-
-sudo pip install virtualenv
-
-cd ${releng_repo}/modules
-sudo virtualenv venv
-source venv/bin/activate
-sudo pip install -e ./ >/dev/null
-sudo pip install netaddr
-
-if [[ ${INSTALLER_TYPE} == compass ]]; then
- options="-u root -p root"
-elif [[ ${INSTALLER_TYPE} == fuel ]]; then
- options="-u root -p r00tme"
-elif [[ ${INSTALLER_TYPE} == apex ]]; then
- options="-u stack -k /root/.ssh/id_rsa"
-else
- echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently."
- echo "HA test cases may not run properly."
+if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then
+ cat << EOF >${DOVETAIL_CONFIG}/pod.yaml
+nodes:
+- {ip: 10.1.0.52, name: node1, password: root, role: controller, user: root}
+- {ip: 10.1.0.51, name: node2, password: root, role: controller, user: root}
+- {ip: 10.1.0.50, name: node3, password: root, role: controller, user: root}
+- {ip: 10.1.0.54, name: node4, password: root, role: compute, user: root}
+- {ip: 10.1.0.53, name: node5, password: root, role: compute, user: root}
+
+EOF
fi
-cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \
- -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml"
-echo ${cmd}
-${cmd}
+if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then
+ set +e
+
+ sudo pip install virtualenv
+
+ cd ${releng_repo}/modules
+ sudo virtualenv venv
+ source venv/bin/activate
+ sudo pip install -e ./ >/dev/null
+ sudo pip install netaddr
+
+ if [[ ${INSTALLER_TYPE} == compass ]]; then
+ options="-u root -p root"
+ elif [[ ${INSTALLER_TYPE} == fuel ]]; then
+ options="-u root -p r00tme"
+ elif [[ ${INSTALLER_TYPE} == apex ]]; then
+ options="-u stack -k /root/.ssh/id_rsa"
+ else
+ echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently."
+ echo "HA test cases may not run properly."
+ fi
-deactivate
+ cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \
+ -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml"
+ echo ${cmd}
+ ${cmd}
-set -e
+ deactivate
-cd ${WORKSPACE}
+ set -e
+
+ cd ${WORKSPACE}
+fi
if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then
echo "file ${DOVETAIL_CONFIG}/pod.yaml:"