Merge "Bump odlparent-master maven version"
[releng/builder.git] / jjb / integration / integration-deploy-openstack-run-test.sh
index 37c52a1f064c606c849b653b028ad2a372abd8d0..4076e47de796da36c7005e63b83ef7cf694a70b9 100644 (file)
@@ -1,4 +1,4 @@
-#@IgnoreInspection BashAddShebang
+#!/bin/bash
 # Activate robotframework virtualenv
 # ${ROBOT_VENV} comes from the integration-install-robotframework.sh
 # script.
@@ -6,7 +6,8 @@
 source ${ROBOT_VENV}/bin/activate
 PYTHON="${ROBOT_VENV}/bin/python"
 SSH="ssh -t -t"
-ADMIN_PASSWORD=admin
+ADMIN_PASSWORD="admin"
+OPENSTACK_MASTER_CLIENTS_VERSION="pike"
 
 # 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"
@@ -98,6 +99,38 @@ function create_etc_hosts() {
     cat ${WORKSPACE}/hosts_file
 } # create_etc_hosts()
 
+#function to install Openstack Clients for Testing
+#This will pull the latest versions compatiable with the
+# openstack release
+function install_openstack_clients_in_robot_vm() {
+    packages=("python-novaclient" "python-neutronclient" "python-openstackclient")
+    for plugin_name in ${ENABLE_OS_PLUGINS}; do
+        if [ "$plugin_name" == "networking-sfc" ]; then
+            packages+=("networking-sfc")
+        fi
+    done
+    openstack_version=$(echo ${OPENSTACK_BRANCH} | cut -d/ -f2)
+    #If the job tests "master", we will use the clients from previous released stable version to avoid failures
+    if [ "${openstack_version}" == "master" ]; then
+       openstack_version=${OPENSTACK_MASTER_CLIENTS_VERSION}
+    fi
+    for package in ${packages[*]}; do
+       echo "Get the current support version of the package ${package}"
+       wget https://raw.githubusercontent.com/openstack/requirements/stable/${openstack_version}/upper-constraints.txt -O /tmp/constraints.txt 2>/dev/null
+       echo "$PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt"
+       $PYTHON -m pip install --upgrade --no-deps ${package} --no-cache-dir -c /tmp/constraints.txt
+       echo "$PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt"
+       $PYTHON -m pip install ${package} --no-cache-dir -c /tmp/constraints.txt
+    done
+
+    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
+    fi
+}
+
+
+
 # convert commas in csv strings to spaces (ssv)
 function csv2ssv() {
     local csv=$1
@@ -158,7 +191,7 @@ NEUTRON_CREATE_INITIAL_NETWORKS=${CREATE_INITIAL_NETWORKS}
 
 ODL_MODE=manual
 ODL_MGR_IP=${MGRIP}
-ODL_PORT=8080
+ODL_PORT=${ODL_PORT}
 ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
 ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}
 
@@ -248,13 +281,9 @@ minimize_polling=True
 
 [ml2]
 # Needed for VLAN provider tests - because our provider networks are always encapsulated in VXLAN (br-physnet1)
-# MTU(1440) + VXLAN(50) + VLAN(4) = 1494 < MTU eth0/br-physnet1(1500)
-physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1440
-path_mtu = 1490
-
-# workaround for port-status not working due to https://bugs.opendaylight.org/show_bug.cgi?id=9092
-[ml2_odl]
-odl_features=nothing
+# MTU(1400) + VXLAN(50) + VLAN(4) = 1454 < MTU eth0/br-physnet1(1458)
+physical_network_mtus = ${PUBLIC_PHYSICAL_NETWORK}:1400
+path_mtu = 1458
 
 [[post-config|/etc/neutron/dhcp_agent.ini]]
 [DEFAULT]
@@ -264,6 +293,7 @@ enable_isolated_metadata = True
 [[post-config|/etc/nova/nova.conf]]
 [DEFAULT]
 force_config_drive = False
+force_raw_images = False
 
 [scheduler]
 discover_hosts_in_cells_interval = 30
@@ -301,7 +331,7 @@ Q_ML2_TENANT_NETWORK_TYPE=${TENANT_NETWORK_TYPE}
 
 ODL_MODE=manual
 ODL_MGR_IP=${MGRIP}
-ODL_PORT=8080
+ODL_PORT=${ODL_PORT}
 ODL_PORT_BINDING_CONTROLLER=${ODL_ML2_PORT_BINDING}
 ODL_OVS_MANAGERS=${ODL_OVS_MANAGERS}
 
@@ -344,6 +374,7 @@ EOF
 auth_strategy = keystone
 [DEFAULT]
 use_neutron = True
+force_raw_images = False
 EOF
 
     echo "Compute local.conf created:"
@@ -352,6 +383,7 @@ EOF
 
 function configure_haproxy_for_neutron_requests() {
     MGRIP=$1
+    # shellcheck disable=SC2206
     ODL_IPS=(${2//,/ })
 
     cat > ${WORKSPACE}/install_ha_proxy.sh<< EOF
@@ -435,37 +467,28 @@ function list_files () {
     ${SSH} ${ip} "sudo find /etc > /tmp/find.etc.txt"
     ${SSH} ${ip} "sudo find /opt/stack > /tmp/find.opt.stack.txt"
     ${SSH} ${ip} "sudo find /var > /tmp/find2.txt"
-    rsync --rsync-path="sudo rsync" -arv --list-only ssh ${ip}:/var/ > ${folder}/rsync.var.txt
+    ${SSH} ${ip} "sudo find /var > /tmp/find.var.txt"
+    rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/etc/ > ${folder}/rsync.etc.txt
+    rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/opt/stack/ > ${folder}/rsync.opt.stack.txt
+    rsync --rsync-path="sudo rsync" --list-only -arvhe ssh ${ip}:/var/ > ${folder}/rsync.var.txt
     scp ${ip}:/tmp/find.etc.txt ${folder}
     scp ${ip}:/tmp/find.opt.stack.txt ${folder}
     scp ${ip}:/tmp/find2.txt ${folder}
+    scp ${ip}:/tmp/find.var.txt ${folder}
 }
 
 function collect_logs () {
     set +e  # We do not want to create red dot just because something went wrong while fetching logs.
 
-    for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
-        CONTROLLERIP=ODL_SYSTEM_${i}_IP
-        echo "Lets's take the karaf thread dump again..."
-        KARAF_PID=$(ssh ${!CONTROLLERIP} "ps aux | grep ${KARAF_ARTIFACT} | grep -v grep | tr -s ' ' | cut -f2 -d' '")
-        ssh ${!CONTROLLERIP} "jstack $KARAF_PID"> ${WORKSPACE}/karaf_${i}_threads_after.log || true
-        echo "killing karaf process..."
-        ${SSH} "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh'
-    done
-
     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 ct_ /var/log/openvswitch/ovs-vswitchd.log
-echo -e "\novsdb-tool -mm show-log\n"
-ovsdb-tool -mm show-log
+grep "Datapath supports" /var/log/openvswitch/ovs-vswitchd.log
 echo -e "\nsudo netstat -punta\n"
 sudo netstat -punta
 echo -e "\nsudo getenforce\n"
 sudo getenforce
-echo -e "\njournalctl > /tmp/journalctl.log\n"
-sudo journalctl > /tmp/journalctl.log
 echo -e "\nsudo systemctl status httpd\n"
 sudo systemctl status httpd
 echo -e "\nenv\n"
@@ -473,6 +496,16 @@ env
 source /opt/stack/devstack/openrc admin admin
 echo -e "\nenv after openrc\n"
 env
+echo -e "\nsudo du -hs /opt/stack"
+sudo du -hs /opt/stack
+echo -e "\nsudo mount"
+sudo mount
+echo -e "\ndmesg -T > /tmp/dmesg.log"
+dmesg -T > /tmp/dmesg.log
+echo -e "\njournalctl > /tmp/journalctl.log\n"
+sudo journalctl > /tmp/journalctl.log
+echo -e "\novsdb-tool -mm show-log > /tmp/ovsdb-tool.log"
+ovsdb-tool -mm show-log > /tmp/ovsdb-tool.log
 EOF
 
     # Since this log collection work is happening before the archive build macro which also
@@ -480,13 +513,23 @@ EOF
     # archives build step will essentially be a noop.
     mkdir -p ${WORKSPACE}/archives
 
+    mv /tmp/changes.txt ${WORKSPACE}/archives
+
     sleep 5
     # FIXME: Do not create .tar and gzip before copying.
     for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
         CONTROLLERIP=ODL_SYSTEM_${i}_IP
+        echo "collect_logs: for opendaylight controller ip: ${!CONTROLLERIP}"
         NODE_FOLDER="odl_${i}"
         mkdir -p ${NODE_FOLDER}
-        ${SSH} ${!CONTROLLERIP} "journalctl > /tmp/journalctl.log"
+        echo "Lets's take the karaf thread dump again..."
+        ssh ${!CONTROLLERIP} "sudo ps aux" > ${WORKSPACE}/ps_after.log
+        pid=$(grep org.apache.karaf.main.Main ${WORKSPACE}/ps_after.log | grep -v grep | tr -s ' ' | cut -f2 -d' ')
+        echo "karaf main: org.apache.karaf.main.Main, pid:${pid}"
+        ssh ${!CONTROLLERIP} "jstack ${pid}" > ${WORKSPACE}/karaf_${i}_${pid}_threads_after.log || true
+        echo "killing karaf process..."
+        ${SSH} "${!CONTROLLERIP}" bash -c 'ps axf | grep karaf | grep -v grep | awk '"'"'{print "kill -9 " $1}'"'"' | sh'
+        ${SSH} ${!CONTROLLERIP} "sudo journalctl > /tmp/journalctl.log"
         scp ${!CONTROLLERIP}:/tmp/journalctl.log ${NODE_FOLDER}
         ${SSH} ${!CONTROLLERIP} "dmesg -T > /tmp/dmesg.log"
         scp ${!CONTROLLERIP}:/tmp/dmesg.log ${NODE_FOLDER}
@@ -495,15 +538,15 @@ EOF
         scp ${!CONTROLLERIP}:/tmp/odl${i}_karaf.log.tar ${NODE_FOLDER}
         ${SSH} ${!CONTROLLERIP} "tar -cf /tmp/odl${i}_zrpcd.log.tar /tmp/zrpcd.init.log"
         scp ${!CONTROLLERIP}:/tmp/odl${i}_zrpcd.log.tar ${NODE_FOLDER}
-        tar -xvf ${WORKSPACE}/odl${i}_karaf.log.tar -C . --strip-components 2 --transform s/karaf/odl${i}_karaf/g
+        tar -xvf ${NODE_FOLDER}/odl${i}_karaf.log.tar -C ${NODE_FOLDER} --strip-components 2 --transform s/karaf/odl${i}_karaf/g
         grep "ROBOT MESSAGE\| ERROR " ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_err.log
-        # Print ROBOT lines, Print Caused by...Exception: lines,
-        # Print Exception{ lines as well as the previous line that has the timestamp for context
-        sed -n -e '/ROBOT MESSAGE/P' -e '/Caused by.*Exception:/P' -e '$!N;/Exception:/P;D' -e '$!N;/Exception{/P;D' \
-            ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_exception.log
         grep "ROBOT MESSAGE\| ERROR \| WARN \|Exception" \
             ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_err_warn_exception.log
-        rm ${WORKSPACE}/odl${i}_karaf.log.tar
+        # Print ROBOT lines and print Exception lines. For exception lines also print the previous line for context
+        sed -n -e '/ROBOT MESSAGE/P' -e '$!N;/Exception/P;D' ${NODE_FOLDER}/odl${i}_karaf.log > ${NODE_FOLDER}/odl${i}_exception.log
+        rm ${NODE_FOLDER}/odl${i}_karaf.log.tar
+        mv *_threads* ${NODE_FOLDER}
+        mv ps_* ${NODE_FOLDER}
         mv ${NODE_FOLDER} ${WORKSPACE}/archives/
     done
 
@@ -512,8 +555,12 @@ EOF
     # Control Node
     for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
         OSIP=OPENSTACK_CONTROL_NODE_${i}_IP
+        echo "collect_logs: for openstack control node ip: ${!OSIP}"
         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"
+        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}
         scp ${!OSIP}:/etc/keystone/keystone-uwsgi-public.ini ${NODE_FOLDER}
@@ -535,33 +582,37 @@ EOF
         scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER}
         scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER}
         scp ${!OSIP}:/opt/stack/tempest/etc/tempest.conf ${NODE_FOLDER}
+        scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}
+        scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER}
+        scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
         scp ${!OSIP}:/tmp/get_devstack.sh.txt ${NODE_FOLDER}
-        scp ${!OSIP}:/var/log/httpd/keystone_access.log ${NODE_FOLDER}
-        scp ${!OSIP}:/var/log/httpd/keystone.log ${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}
         list_files "${!OSIP}" "${NODE_FOLDER}"
         rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/etc/hosts ${NODE_FOLDER}
         rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/usr/lib/systemd/system/haproxy.service ${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/dmesg.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 --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/rabbitmq ${NODE_FOLDER}
         rsync -avhe ssh ${!OSIP}:/opt/stack/logs/* ${NODE_FOLDER} # rsync to prevent copying of symbolic links
-        scp extra_debug.sh ${!OSIP}:/tmp
-        ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
-        scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
-        scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
-        scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}
         mv local.conf_control_${!OSIP} ${NODE_FOLDER}/local.conf
+        # qdhcp files are created by robot tests
+        mv /tmp/qdhcp ${NODE_FOLDER}
         mv ${NODE_FOLDER} ${WORKSPACE}/archives/
     done
 
     # Compute Nodes
     for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
         OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP
+        echo "collect_logs: for openstack compute node ip: ${!OSIP}"
         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"
         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}
@@ -569,22 +620,21 @@ EOF
         scp ${!OSIP}:/opt/stack/devstack/nohup.out ${NODE_FOLDER}/stack.log
         scp ${!OSIP}:/opt/stack/devstack/openrc ${NODE_FOLDER}
         scp ${!OSIP}:/opt/stack/requirements/upper-constraints.txt ${NODE_FOLDER}
+        scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/
+        scp ${!OSIP}:/tmp/dmesg.log ${NODE_FOLDER}
+        scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
         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}
         list_files "${!OSIP}" "${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/dmesg.log ${NODE_FOLDER}
         rsync --rsync-path="sudo rsync" -avhe ssh ${!OSIP}:/var/log/libvirt ${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
-        scp extra_debug.sh ${!OSIP}:/tmp
-        ${SSH} ${!OSIP} "bash /tmp/extra_debug.sh > /tmp/extra_debug.log"
-        scp ${!OSIP}:/tmp/extra_debug.log ${NODE_FOLDER}
-        scp ${!OSIP}:/tmp/journalctl.log ${NODE_FOLDER}
-        scp ${!OSIP}:/tmp/*.xz ${NODE_FOLDER}/
         mv local.conf_compute_${!OSIP} ${NODE_FOLDER}/local.conf
         mv ${NODE_FOLDER} ${WORKSPACE}/archives/
     done
@@ -676,6 +726,43 @@ function get_service () {
     set -e
 }
 
+# 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
+    rm -f rabbit.txt
+    ${SSH} ${ip} "sudo rabbitmqctl status" > rabbit.txt
+    grep pid 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}
+    local -i retries=1
+    local -i rc=1
+    while true; do
+        echo "retry ${cmd}: attempt: ${retries}"
+        ${cmd}
+        rc=$?
+        if ((${rc} == 0)); then
+            break;
+        else
+            if ((${retries} == ${max_tries})); then
+                break
+            else
+                ((retries++))
+                sleep ${sleep_time}
+            fi
+        fi
+    done
+    set -e
+    return ${rc}
+}
+
 # if we are using the new netvirt impl, as determined by the feature name
 # odl-netvirt-openstack (note: old impl is odl-ovsdb-openstack) then we
 # want PROVIDER_MAPPINGS to be used -- this should be fixed if we want to support
@@ -696,6 +783,7 @@ else
 fi
 
 RECLONE=False
+ODL_PORT=8181
 
 # Always compare the lists below against the devstack upstream ENABLED_SERVICES in
 # https://github.com/openstack-dev/devstack/blob/master/stackrc#L52
@@ -747,6 +835,8 @@ echo "127.0.0.1   localhost \${HOSTNAME}" >> /tmp/hosts
 echo "::1         localhost \${HOSTNAME}" >> /tmp/hosts
 sudo mv /tmp/hosts /etc/hosts
 sudo mkdir /opt/stack
+echo "Create RAM disk for /opt/stack"
+sudo mount -t tmpfs -o size=2G tmpfs /opt/stack
 sudo chmod 777 /opt/stack
 cd /opt/stack
 echo "git clone https://git.openstack.org/openstack-dev/devstack --branch ${OPENSTACK_BRANCH}"
@@ -761,6 +851,10 @@ 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
+
+#Install qemu-img command in Control Node for Pike
+echo "Install qemu-img application"
+sudo yum install -y qemu-img
 EOF
 
 cat > "${WORKSPACE}/setup_host_cell_mapping.sh" << EOF
@@ -813,7 +907,7 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
     ssh ${!CONTROLIP} "cd /opt/stack/devstack; nohup ./stack.sh > /opt/stack/devstack/nohup.out 2>&1 &"
     ssh ${!CONTROLIP} "ps -ef | grep stack.sh"
     ssh ${!CONTROLIP} "ls -lrt /opt/stack/devstack/nohup.out"
-    os_node_list+=(${!CONTROLIP})
+    os_node_list+=("${!CONTROLIP}")
     # Workaround for stable/newton jobs
     # TODO: can this be removed now?
     if [ "${ODL_ML2_BRANCH}" == "stable/newton" ]; then
@@ -833,9 +927,17 @@ done
 # AccessRefused: (0, 0): (403) ACCESS_REFUSED - Login was refused using authentication mechanism AMQPLAIN. For details see the broker logfile.
 # 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.
-# TODO: modify devstack to wait for rabbitmq to be available on the controller before starting nova-compute.
-echo "Sleeping for 360s to allow controller to create nova_cell1 before the computes need it"
-sleep 360
+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
+    echo "rabbitmq is ready, starting ${NUM_OPENSTACK_COMPUTE_NODES} compute(s)"
+else
+    echo "rabbitmq was not ready in ${WAIT_FOR_RABBITMQ_MINUTES}m"
+    collect_logs
+    exit 1
+fi
 
 for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
     NUM_COMPUTES_PER_SITE=$((NUM_OPENSTACK_COMPUTE_NODES / NUM_OPENSTACK_SITES))
@@ -866,7 +968,7 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
     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"
-    os_node_list+=(${!COMPUTEIP})
+    os_node_list+=("${!COMPUTEIP}")
 done
 
 echo "nodelist: ${os_node_list[*]}"
@@ -994,6 +1096,7 @@ for i in `seq 1 ${NUM_OPENSTACK_SITES}`; do
 
     # ipsec support
     if [ "${IPSEC_VXLAN_TUNNELS_ENABLED}" == "yes" ]; then
+        # shellcheck disable=SC2206
         ALL_NODES=(${!CONTROLIP} ${COMPUTE_IPS[*]})
         for ((inx_ip1=0; inx_ip1<$((${#ALL_NODES[@]} - 1)); inx_ip1++)); do
             for ((inx_ip2=$((inx_ip1 + 1)); inx_ip2<${#ALL_NODES[@]}; inx_ip2++)); do
@@ -1037,6 +1140,10 @@ 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} "
@@ -1057,6 +1164,10 @@ 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
 
@@ -1088,8 +1199,23 @@ cat testplan.txt
 # Use the testplan if specific SUITES are not defined.
 if [ -z "${SUITES}" ]; then
     SUITES=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+else
+    newsuites=""
+    workpath="${WORKSPACE}/test/csit/suites"
+    for suite in ${SUITES}; do
+        fullsuite="${workpath}/${suite}"
+        if [ -z "${newsuites}" ]; then
+            newsuites+=${fullsuite}
+        else
+            newsuites+=" "${fullsuite}
+        fi
+    done
+    SUITES=${newsuites}
 fi
 
+#install all client versions required for this job testing
+install_openstack_clients_in_robot_vm
+
 # TODO: run openrc on control node and then scrape the vars from it
 # Environment Variables Needed to execute Openstack Client for NetVirt Jobs
 cat > /tmp/os_netvirt_client_rc << EOF
@@ -1107,11 +1233,32 @@ EOF
 
 source /tmp/os_netvirt_client_rc
 
+echo "Get all versions before executing pybot"
+echo "openstack --version"
+which openstack
+openstack --version
+echo "nova --version"
+which nova
+nova --version
+echo "neutron --version"
+which neutron
+neutron --version
+
 echo "Starting Robot test suites ${SUITES} ..."
 # please add pybot -v arguments on a single line and alphabetized
-pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \
+suite_num=0
+for suite in ${SUITES}; do
+    # prepend a incrmental counter to the suite name so that the full robot log combining all the suites as is done
+    # in the rebot step below will list all the suites in chronological order as rebot seems to alphabatize them
+    let "suite_num = suite_num + 1"
+    suite_index="$(printf %02d ${suite_num})"
+    suite_name="$(basename ${suite} | cut -d. -f1)"
+    log_name="${suite_index}_${suite_name}"
+    pybot -N ${log_name} --removekeywords wuks -c critical -e exclude -e skip_if_${DISTROSTREAM} \
+    --log log_${log_name}.html --report None --output output_${log_name}.xml \
     -v BUNDLEFOLDER:${BUNDLEFOLDER} \
     -v BUNDLE_URL:${ACTUAL_BUNDLE_URL} \
+    -v CONTROLLERFEATURES:"${CONTROLLERFEATURES}" \
     -v CONTROLLER_USER:${USER} \
     -v DEVSTACK_DEPLOY_PATH:/opt/stack/devstack \
     -v HA_PROXY_IP:${HA_PROXY_IP} \
@@ -1155,7 +1302,10 @@ pybot -N ${TESTPLAN} --removekeywords wuks -c critical -e exclude -e skip_if_${D
     -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \
     -v USER_HOME:${HOME} \
     -v WORKSPACE:/tmp \
-    ${TESTOPTIONS} ${SUITES} || true
+    ${TESTOPTIONS} ${suite} || true
+done
+#rebot exit codes seem to be different
+rebot --output ${WORKSPACE}/output.xml --log log_full.html --report None -N openstack output_*.xml || true
 
 echo "Examining the files in data/log and checking file size"
 ssh ${ODL_SYSTEM_IP} "ls -altr /tmp/${BUNDLEFOLDER}/data/log/"