X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-deploy-openstack-run-test.sh;h=2862d190e254c1db4e32510179b953f082d33855;hb=d4217fcc0ced511ebf4e2e8bb6a021dbce2a58ef;hp=737248f1d66a0b8214566241caee62e1714fa282;hpb=2e3c670b058908eba7ac31b567ce13ae0450f6dd;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-deploy-openstack-run-test.sh b/jjb/integration/integration-deploy-openstack-run-test.sh index 737248f1d..2862d190e 100644 --- a/jjb/integration/integration-deploy-openstack-run-test.sh +++ b/jjb/integration/integration-deploy-openstack-run-test.sh @@ -4,17 +4,25 @@ # script. # shellcheck source=${ROBOT_VENV}/bin/activate disable=SC1091 source ${ROBOT_VENV}/bin/activate +source /tmp/common-functions.sh ${BUNDLEFOLDER} + PYTHON="${ROBOT_VENV}/bin/python" SSH="ssh -t -t" ADMIN_PASSWORD="admin" -OPENSTACK_MASTER_CLIENTS_VERSION="pike" +OPENSTACK_MASTER_CLIENTS_VERSION="queens" # TODO: remove this work to run changes.py if/when it's moved higher up to be visible at the Robot level -echo "showing recent changes that made it in to the distribution used by this job" +printf "\nshowing recent changes that made it into the distribution used by this job:\n" $PYTHON -m pip install --upgrade urllib3 python ${WORKSPACE}/test/tools/distchanges/changes.py -d /tmp/distribution_folder \ -u ${ACTUAL_BUNDLE_URL} -b ${DISTROBRANCH} \ -r ssh://jenkins-${SILO}@git.opendaylight.org:29418 || true + +printf "\nshowing recent changes that made it into integration/test used by this job:\n" +cd ${WORKSPACE}/test +git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s' -n10 +cd - + cat << EOF ################################################# ## Deploy Openstack 3-node ## @@ -27,8 +35,8 @@ function trap_handler() { local prog="$0" local lastline="$1" local lasterr="$2" - echo "${prog}: line ${lastline}: exit status of last command: ${lasterr}" - echo "command: ${BASH_COMMAND}" + echo "trap_hanlder: ${prog}: line ${lastline}: exit status of last command: ${lasterr}" + echo "trap_handler: command: ${BASH_COMMAND}" collect_logs exit 1 } # trap_handler() @@ -105,7 +113,9 @@ function create_etc_hosts() { # openstack release function install_openstack_clients_in_robot_vm() { packages=("python-novaclient" "python-neutronclient" "python-openstackclient") - for plugin_name in ${ENABLE_OS_PLUGINS}; do + local os_plugins + os_plugins=$(csv2ssv "${ENABLE_OS_PLUGINS}") + for plugin_name in $os_plugins; do if [ "$plugin_name" == "networking-sfc" ]; then packages+=("networking-sfc") fi @@ -126,22 +136,10 @@ function install_openstack_clients_in_robot_vm() { if [ "${ENABLE_NETWORKING_L2GW}" == "yes" ]; then #networking-l2gw is not officially available in any release yet. Gettting the latest stable version. - $PYTHON -m pip install networking-l2gw + $PYTHON -m pip install networking-l2gw==11.0.0 fi } - - -# convert commas in csv strings to spaces (ssv) -function csv2ssv() { - local csv=$1 - if [ -n "${csv}" ]; then - ssv=$(echo ${csv} | sed 's/,/ /g' | sed 's/\ \ */\ /g') - fi - - echo "${ssv}" -} # csv2ssv - function is_openstack_feature_enabled() { local feature=$1 for enabled_feature in $(csv2ssv ${ENABLE_OS_SERVICES}) @@ -165,6 +163,31 @@ function fix_libvirt_version_n_cpu_ocata() { " } +#Function to install rdo release +# This will help avoiding installing wrong version of packages which causes +# functionality failures +function install_rdo_release() { + local ip=$1 + case ${OPENSTACK_BRANCH} in + *pike*) + ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-pike/rdo-release-pike-1.noarch.rpm" + ;; + + *queens*) + ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-queens/rdo-release-queens-1.noarch.rpm" + ;; + + *ocata*) + ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-3.noarch.rpm" + ;; + + master) + ${SSH} ${ip} "sudo yum install -y https://repos.fedorapeople.org/repos/openstack/openstack-queens/rdo-release-queens-1.noarch.rpm" + ;; + esac +} + + # Add enable_services and disable_services to the local.conf function add_os_services() { local core_services=$1 @@ -206,6 +229,8 @@ USE_SCREEN=True SCREEN_LOGDIR=/opt/stack/data/log LOG_COLOR=False RECLONE=${RECLONE} +# Increase the wait used by stack to poll for services +SERVICE_TIMEOUT=120 disable_all_services EOF @@ -278,7 +303,7 @@ EOF cat >> ${local_conf_file_name} << EOF enable_plugin networking-l2gw ${NETWORKING_L2GW_DRIVER} ${ODL_ML2_BRANCH} -NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver.OpenDaylightL2gwDriver:default +NETWORKING_L2GW_SERVICE_DRIVER=L2GW:OpenDaylight:networking_odl.l2gateway.driver_v2.OpenDaylightL2gwDriver:default EOF fi @@ -352,6 +377,8 @@ LOG_COLOR=False USE_SCREEN=True SCREEN_LOGDIR=/opt/stack/data/log RECLONE=${RECLONE} +# Increase the wait used by stack to poll for the nova service on the control node +NOVA_READY_TIMEOUT=1800 disable_all_services EOF @@ -359,7 +386,6 @@ EOF add_os_services "${CORE_OS_COMPUTE_SERVICES}" "${ENABLE_OS_COMPUTE_SERVICES}" "${DISABLE_OS_SERVICES}" "${local_conf_file_name}" cat >> ${local_conf_file_name} << EOF - HOST_IP=${HOSTIP} SERVICE_HOST=${SERVICEHOST} Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE} @@ -450,30 +476,26 @@ defaults listen opendaylight bind ${MGRIP}:8080 balance source -EOF - - odlindex=1 - for odlip in ${ODL_IPS[*]}; do - cat >> ${WORKSPACE}/haproxy.cfg << EOF - server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2 -EOF - odlindex=$((odlindex+1)) - done - cat >> ${WORKSPACE}/haproxy.cfg << EOF listen opendaylight_rest bind ${MGRIP}:8181 balance source + +listen opendaylight_websocket + bind ${MGRIP}:8185 + balance source + EOF odlindex=1 for odlip in ${ODL_IPS[*]}; do - cat >> ${WORKSPACE}/haproxy.cfg << EOF - server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2 -EOF + sed -i "/listen opendaylight$/a server controller-${odlindex} ${odlip}:8080 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg + sed -i "/listen opendaylight_rest$/a server controller-rest-${odlindex} ${odlip}:8181 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg + sed -i "/listen opendaylight_websocket$/a server controller-websocket-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" ${WORKSPACE}/haproxy.cfg odlindex=$((odlindex+1)) done + echo "Dump haproxy.cfg" cat ${WORKSPACE}/haproxy.cfg @@ -496,7 +518,7 @@ EOF } # configure_haproxy_for_neutron_requests() # Collect the list of files on the hosts -function collect_files () { +function collect_files() { local -r ip=$1 local -r folder=$2 finddir=/tmp/finder @@ -515,14 +537,90 @@ function collect_files () { cp /tmp/rsync.tar.xz ${folder} } -function collect_logs () { +# List of extra services to extract from journalctl +# Add new services on a separate line, in alpha order, add \ at the end +extra_services_cntl=" \ + dnsmasq.service \ + httpd.service \ + libvirtd.service \ + openvswitch.service \ + ovs-vswitchd.service \ + ovsdb-server.service \ + rabbitmq-server.service \ +" + +extra_services_cmp=" \ + libvirtd.service \ + openvswitch.service \ + ovs-vswitchd.service \ + ovsdb-server.service \ +" + +# Collect the logs for the openstack services +# First get all the services started by devstack which would have devstack@ as a prefix +# Next get all the extra services +function collect_openstack_logs() { + local -r ip=${1} + local -r folder=${2} + local -r node_type=${3} + local oslogs="${folder}/oslogs" + + printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}\n" + rm -rf ${oslogs} + mkdir -p ${oslogs} + # There are always some logs in /opt/stack/logs and this also covers the + # pre-queens branches which always use /opt/stack/logs + rsync -avhe ssh ${ip}:/opt/stack/logs/* ${oslogs} # rsync to prevent copying of symbolic links + + # Starting with queens break out the logs from journalctl + if [ "${OPENSTACK_BRANCH}" = "stable/queens" ]; then + cat > ${WORKSPACE}/collect_openstack_logs.sh << EOF +extra_services_cntl="${extra_services_cntl}" +extra_services_cmp="${extra_services_cmp}" + +function extract_from_journal() { + local -r services=\${1} + local -r folder=\${2} + local -r node_type=\${3} + printf "extract_from_journal folder: \${folder}, services: \${services}\n" + for service in \${services}; do + # strip anything before @ and anything after . + # devstack@g-api.service will end as g-api + service_="\${service#*@}" + service_="\${service_%.*}" + sudo journalctl -u "\${service}" > "\${folder}/\${service_}.log" + done +} + +rm -rf /tmp/oslogs +mkdir -p /tmp/oslogs +systemctl list-unit-files --all > /tmp/oslogs/systemctl.units.log 2>&1 +svcs=\$(grep devstack@ /tmp/oslogs/systemctl.units.log | awk '{print \$1}') +extract_from_journal "\${svcs}" "/tmp/oslogs" +if [ "\${node_type}" = "control" ]; then + extract_from_journal "\${extra_services_cntl}" "/tmp/oslogs" +else + extract_from_journal "\${extra_services_cmp}" "/tmp/oslogs" +fi +ls -al /tmp/oslogs +EOF + printf "collect_openstack_logs for ${node_type} node: ${ip} into ${oslogs}, executing script\n" + cat ${WORKSPACE}/collect_openstack_logs.sh + scp ${WORKSPACE}/collect_openstack_logs.sh ${ip}:/tmp + ${SSH} ${ip} "bash /tmp/collect_openstack_logs.sh > /tmp/collect_openstack_logs.log 2>&1" + rsync -avhe ssh ${ip}:/tmp/oslogs/* ${oslogs} + scp ${ip}:/tmp/collect_openstack_logs.log ${oslogs} + fi +} + +function collect_logs() { set +e # We do not want to create red dot just because something went wrong while fetching logs. cat > extra_debug.sh << EOF echo -e "/usr/sbin/lsmod | /usr/bin/grep openvswitch\n" /usr/sbin/lsmod | /usr/bin/grep openvswitch -echo -e "\ngrep ct_ /var/log/openvswitch/ovs-vswitchd.log\n" -grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log +echo -e "\nsudo grep ct_ /var/log/openvswitch/ovs-vswitchd.log\n" +sudo grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log echo -e "\nsudo netstat -punta\n" sudo netstat -punta echo -e "\nsudo getenforce\n" @@ -552,6 +650,7 @@ EOF mkdir -p ${WORKSPACE}/archives mv /tmp/changes.txt ${WORKSPACE}/archives + mv ${WORKSPACE}/rabbit.txt ${WORKSPACE}/archives sleep 5 # FIXME: Do not create .tar and gzip before copying. @@ -599,7 +698,7 @@ EOF NODE_FOLDER="control_${i}" mkdir -p ${NODE_FOLDER} scp extra_debug.sh ${!OSIP}:/tmp - ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log" + ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1" scp ${!OSIP}:/etc/dnsmasq.conf ${NODE_FOLDER} scp ${!OSIP}:/etc/keystone/keystone.conf ${NODE_FOLDER} scp ${!OSIP}:/etc/keystone/keystone-uwsgi-admin.ini ${NODE_FOLDER} @@ -628,8 +727,6 @@ EOF scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER} scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER} - scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} - scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} collect_files "${!OSIP}" "${NODE_FOLDER}" ${SSH} ${!OSIP} "sudo tar -cf - -C /var/log rabbitmq | xz -T 0 > /tmp/rabbitmq.tar.xz " scp ${!OSIP}:/tmp/rabbitmq.tar.xz ${NODE_FOLDER} @@ -638,8 +735,10 @@ EOF rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER} rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone_access.log ${NODE_FOLDER} rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/httpd/keystone.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER} - rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER} + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} + collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "control" mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf # qdhcp files are created by robot tests and copied into /tmp/qdhcp during the test tar -cf - -C /tmp qdhcp | xz -T 0 > /tmp/qdhcp.tar.xz @@ -654,7 +753,7 @@ EOF NODE_FOLDER="compute_${i}" mkdir -p ${NODE_FOLDER} scp extra_debug.sh ${!OSIP}:/tmp - ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log" + ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log 2>&1" scp ${!OSIP}:/etc/nova/nova.conf ${NODE_FOLDER} scp ${!OSIP}:/etc/nova/nova-cpu.conf ${NODE_FOLDER} scp ${!OSIP}:/etc/openstack/clouds.yaml ${NODE_FOLDER} @@ -668,16 +767,16 @@ EOF scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER} scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER} scp ${!OSIP}:/tmp/ovsdb-tool.log ${NODE_FOLDER} - scp ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} - scp ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} collect_files "${!OSIP}" "${NODE_FOLDER}" ${SSH} ${!OSIP} "sudo tar -cf - -C /var/log libvirt | xz -T 0 > /tmp/libvirt.tar.xz " scp ${!OSIP}:/tmp/libvirt.tar.xz ${NODE_FOLDER} rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${NODE_FOLDER} rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/audit/audit.log ${NODE_FOLDER} - rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages ${NODE_FOLDER} + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/messages* ${NODE_FOLDER} rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/nova-agent.log ${NODE_FOLDER} - rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovs-vswitchd.log ${NODE_FOLDER} + rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/openvswitch/ovsdb-server.log ${NODE_FOLDER} + collect_openstack_logs "${!OSIP}" "${NODE_FOLDER}" "compute" mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf mv ${NODE_FOLDER} ${WORKSPACE}/archives/ done @@ -693,9 +792,6 @@ EOF mkdir -p ${TEMPEST_LOGS_DIR} scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest_results.html ${TEMPEST_LOGS_DIR} scp ${OPENSTACK_CONTROL_NODE_1_IP}:${DEVSTACK_TEMPEST_DIR}/tempest.log ${TEMPEST_LOGS_DIR} - if [ "$(echo ${OPENSTACK_BRANCH} | cut -d/ -f2)" != "master" ]; then - mv ${WORKSPACE}/tempest_output* ${TEMPEST_LOGS_DIR} - fi else echo "tempest results not found in ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/0" fi @@ -774,16 +870,21 @@ function get_service () { # Check if rabbitmq is ready by looking for a pid in it's status. # The function returns the status of the grep command which callers can check. function is_rabbitmq_ready() { - local -r ip=$1 + local -r ip=${1} + local grepfor="nova_cell1" rm -f rabbit.txt - ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt - grep pid rabbit.txt + if [ "${OPENSTACK_BRANCH}" == "stable/ocata" ]; then + ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt + grepfor="pid" + else + ${SSH} ${ip} "sudo rabbitmqctl list_vhosts" > rabbit.txt + fi + grep ${grepfor} rabbit.txt } # retry the given command ($3) until success for a number of iterations ($1) # sleeping ($2) between tries. function retry() { - set +e local -r -i max_tries=${1} local -r -i sleep_time=${2} local -r cmd=${3} @@ -804,7 +905,6 @@ function retry() { fi fi done - set -e return ${rc} } @@ -846,8 +946,10 @@ CORE_OS_CONTROL_SERVICES+=",odl-compute,odl-neutron" # Additional services CORE_OS_CONTROL_SERVICES+=",mysql,rabbit" +# collect performance stats +CORE_OS_COMPUTE_SERVICES="dstat" # computes only need nova and odl -CORE_OS_COMPUTE_SERVICES="n-cpu,odl-compute" +CORE_OS_COMPUTE_SERVICES+=",n-cpu,odl-compute" cat > ${WORKSPACE}/disable_firewall.sh << EOF sudo systemctl stop firewalld @@ -889,12 +991,23 @@ if [ -n "${DEVSTACK_HASH}" ]; then echo "git checkout ${DEVSTACK_HASH}" git checkout ${DEVSTACK_HASH} fi -git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s\n%b' -n20 +echo "workaround: Restore NEUTRON_CREATE_INITIAL_NETWORKS flag" +if [ "${OPENSTACK_BRANCH}" == "stable/queens" ]; then + git config --local user.email jenkins@opendaylight.org + git config --local user.name jenkins + git fetch https://git.openstack.org/openstack-dev/devstack refs/changes/99/550499/1 && git cherry-pick FETCH_HEAD +fi +git --no-pager log --pretty=format:'%h %<(13)%ar%<(13)%cr %<(20,trunc)%an%d %s%b' -n20 +echo echo "workaround: adjust wait from 60s to 1800s (30m)" sed -i 's/wait_for_compute 60/wait_for_compute 1800/g' /opt/stack/devstack/lib/nova # TODO: modify sleep 1 to sleep 60, search wait_for_compute, then first sleep 1 # that would just reduce the number of logs in the compute stack.log +echo "workaround: do not upgrade openvswitch" +sudo yum install -y yum-plugin-versionlock +sudo yum versionlock add openvswitch + #Install qemu-img command in Control Node for Pike echo "Install qemu-img application" sudo yum install -y qemu-img @@ -948,7 +1061,7 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do #Workaround For Queens, Make the physical Network as physnet1 in lib/neutron #Workaround Comment out creating initial Networks in lib/neutron ${SSH} ${!CONTROLIP} "bash /tmp/get_devstack.sh > /tmp/get_devstack.sh.txt 2>&1" - if [ "${ODL_ML2_BRANCH}" == "master" ]; then + if [ "${ODL_ML2_BRANCH}" == "stable/queens" ]; then ssh ${!CONTROLIP} "sed -i 's/flat_networks public/flat_networks public,physnet1/' /opt/stack/devstack/lib/neutron" ssh ${!CONTROLIP} "sed -i '186i iniset \$NEUTRON_CORE_PLUGIN_CONF ml2_type_vlan network_vlan_ranges public:1:4094,physnet1:1:4094' /opt/stack/devstack/lib/neutron" fi @@ -960,6 +1073,8 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do fi create_control_node_local_conf ${!CONTROLIP} ${ODLMGRIP[$i]} "${ODL_OVS_MGRS[$i]}" scp ${WORKSPACE}/local.conf_control_${!CONTROLIP} ${!CONTROLIP}:/opt/stack/devstack/local.conf + echo "Install rdo release to avoid incompatible Package versions" + install_rdo_release ${!CONTROLIP} echo "Stack the control node ${i} of ${NUM_OPENSTACK_CONTROL_NODES}: ${CONTROLIP}" ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" ssh ${!CONTROLIP} "ps -ef | grep stack.sh" @@ -980,17 +1095,19 @@ done # Compare that timestamp to this log in the control stack.log: sudo rabbitmqctl set_permissions -p nova_cell1 stackrabbit # If the n-cpu.log is earlier than the control stack.log timestamp then the failure condition is likely hit. if [ ${NUM_OPENSTACK_COMPUTE_NODES} -gt 0 ]; then - WAIT_FOR_RABBITMQ_MINUTES=60 - echo "Wait a maximum of ${WAIT_FOR_RABBITMQ_MINUTES}m until rabbitmq is ready to allow the controller to create nova_cell1 before the computes need it" - retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" - rc=$? - if ((${rc} == 0)); then + WAIT_FOR_RABBITMQ_MINUTES=60 + echo "Wait a maximum of ${WAIT_FOR_RABBITMQ_MINUTES}m until rabbitmq is ready and nova_cell1 created to allow the controller to create nova_cell1 before the computes need it" + set +e + retry ${WAIT_FOR_RABBITMQ_MINUTES} 60 "is_rabbitmq_ready ${OPENSTACK_CONTROL_NODE_1_IP}" + rc=$? + set -e + if ((${rc} == 0)); then echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)" - else + else echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m" collect_logs exit 1 - fi + fi fi for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do @@ -1013,6 +1130,8 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do fi create_compute_node_local_conf ${!COMPUTEIP} ${!CONTROLIP} ${ODLMGRIP[$SITE_INDEX]} "${ODL_OVS_MGRS[$SITE_INDEX]}" scp ${WORKSPACE}/local.conf_compute_${!COMPUTEIP} ${!COMPUTEIP}:/opt/stack/devstack/local.conf + echo "Install rdo release to avoid incompatible Package versions" + install_rdo_release ${!COMPUTEIP} echo "Stack the compute node ${i} of ${NUM_OPENSTACK_COMPUTE_NODES}: ${COMPUTEIP}" ssh ${!COMPUTEIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &" ssh ${!COMPUTEIP} "ps -ef | grep stack.sh" @@ -1188,10 +1307,6 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do sudo ip netns exec pnf_ns ifconfig pnf_veth1 up ${EXTNET_PNF_IP}/24; sudo ovs-vsctl add-port ${PUBLIC_BRIDGE} pnf_veth0; " - # Control Node - set VXLAN TEP IP for Genius Auto TZ - ${SSH} ${!CONTROLIP} " - sudo ovs-vsctl set O . external_ids:tep-ip=${!CONTROLIP}; - " # Control Node - external net internet address simulation ${SSH} ${!CONTROLIP} " @@ -1212,10 +1327,6 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do ${SSH} $compute_ip " sudo ovs-vsctl add-port $PUBLIC_BRIDGE $CONTROLPORT -- set interface $CONTROLPORT type=vxlan options:local_ip=$compute_ip options:remote_ip=${!CONTROLIP} options:dst_port=9876 options:key=flow " - #Compute Node - set VXLAN TEP IP for Genius Auto TZ - ${SSH} $compute_ip " - sudo ovs-vsctl set O . external_ids:tep-ip=${compute_ip}; - " done done