summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorxudan <xudan16@huawei.com>2017-11-22 03:32:40 -0500
committerxudan <xudan16@huawei.com>2017-11-22 04:40:01 -0500
commit945a4802c9ff00b0b5cbd2a04f3f17e40e158b82 (patch)
tree15d83ec750e41980059dc9511c0a482b99059c9f /jjb
parent99ef5a834d97d82f3bd0b43170bfb2d7aa2e4113 (diff)
Bugfix: HA failed on Compass master because of lacking pod.yaml
The module in releng which used to get all the pod info of each installer can't work on Compass master. Create a pod.yaml file for Compass master to ensure HA test cases can be executed successfully. JIRA: DOVETAIL-565 Change-Id: I86cbb4fb07b87b99bf1465d57a76b23e1159ec9f Signed-off-by: xudan <xudan16@huawei.com>
Diffstat (limited to 'jjb')
-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:"