X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fdovetail%2Fdovetail-run.sh;h=fe827808da8b2cac9ee98a275d8f6ee200bd9e96;hb=72ef86e3d2600daf258a3148a26f22abdf6ec3d3;hp=a5148cde9f15bdec95be608af152fe457fa12156;hpb=2a556f8b1db01fa137f6596862dc39e229cfa276;p=releng.git diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index a5148cde9..fe827808d 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -81,6 +81,7 @@ if [[ -f $OPENRC ]]; then exit 1 fi fi + echo "export EXTERNAL_NETWORK=${EXTERNAL_NETWORK}" >> ${OPENRC} else echo "ERROR: cannot find file $OPENRC. Please check if it is existing." sudo ls -al ${DOVETAIL_CONFIG} @@ -123,7 +124,7 @@ if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_T awk '{print \$2; exit}'") &> /dev/null cat << EOF >${DOVETAIL_CONFIG}/pod.yaml nodes: -- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /root/.ssh/id_rsa, role: controller, user: ${ssh_user}} +- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /home/opnfv/userconfig/pre_config/id_rsa, role: controller, user: ${ssh_user}} EOF fi @@ -153,7 +154,8 @@ if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then fi cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ - -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" + -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml \ + -s /home/opnfv/userconfig/pre_config/id_rsa" echo ${cmd} ${cmd} @@ -167,10 +169,14 @@ fi if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then sudo chmod 666 ${DOVETAIL_CONFIG}/pod.yaml echo "Adapt process info for $INSTALLER_TYPE ..." - attack_process='rabbitmq' + if [ "$INSTALLER_TYPE" == "apex" ]; then + attack_process='rabbitmq_server' + else + attach_process='rabbitmq' + fi cat << EOF >> ${DOVETAIL_CONFIG}/pod.yaml process_info: -- {testcase_name: dovetail.ha.tc010, attack_process: ${attack_process}} +- {testcase_name: dovetail.ha.rabbitmq, attack_process: ${attack_process}} EOF echo "file ${DOVETAIL_CONFIG}/pod.yaml:" @@ -322,14 +328,16 @@ docker exec $container_id ${run_cmd} sudo cp -r ${DOVETAIL_HOME}/results ./ # To make sure the file owner is the current user, for the copied results files in the above line -# if not, there will be error when next time to wipe workspace +echo "Change owner of result files ..." CURRENT_USER=${SUDO_USER:-$USER} PRIMARY_GROUP=$(id -gn $CURRENT_USER) -sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ${WORKSPACE}/results +echo "Current user is ${CURRENT_USER}, group is ${PRIMARY_GROUP}" +sudo chown -R ${CURRENT_USER}:${PRIMARY_GROUP} ./results #remove useless files to save disk space sudo rm -rf ./results/workspace sudo rm -f ./results/yardstick.img +sudo rm -f ./results/tmp* echo "Dovetail: done!"