Fix wrong GERRIT_PROJECT
[releng/builder.git] / jjb / integration / integration-deploy-openstack-run-test.sh
index 4f211e022e43cd04836cd2933dcfdb289e9c7e88..afc86d26eec2183ebba46f9237f7e62380f347ad 100644 (file)
@@ -123,7 +123,7 @@ function install_rdo_release() {
 # Involves just setting up the shared directory
 function setup_live_migration_control() {
     local control_ip=$1
-    printf "${control_ip}:Setup directory Share with NFS"
+    printf "%s:Setup directory Share with NFS" "${control_ip}"
     cat > ${WORKSPACE}/setup_live_migration_control.sh << EOF
 sudo mkdir --mode=777 /vm_instances
 sudo chown -R jenkins:jenkins /vm_instances
@@ -136,12 +136,30 @@ EOF
     ssh ${control_ip} "bash /tmp/setup_live_migration_control.sh"
 }
 
+#Fix Problem caused due to new libvirt version in CentOS repo.
+#The libvirt-python 3.10 does not support all the new API exposed
+#This fix will force devstack to use latest libvirt-python
+#from pypi.org (latest version as of 06-Dec-2018)
+function fix_libvirt_python_build() {
+    local ip=$1
+
+    if [ "${ODL_ML2_BRANCH}" == "stable/queens" ]; then
+        ${SSH} ${ip} "
+            cd /opt/stack;
+            git clone https://git.openstack.org/openstack/requirements;
+            cd requirements;
+            git checkout stable/queens;
+            sed -i s/libvirt-python===3.10.0/libvirt-python===4.10.0/ upper-constraints.txt
+        "
+   fi
+}
+
 # Involves mounting the share and configuring the libvirtd
 function setup_live_migration_compute() {
     local compute_ip=$1
     local control_ip=$2
-    printf "${compute_ip}:Mount Shared directory from ${control_ip}"
-    printf "${compute_ip}:Configure libvirt in listen mode"
+    printf "%s:Mount Shared directory from ${control_ip}" "${compute_ip}"
+    printf "%s:Configure libvirt in listen mode" "${compute_ip}"
     cat >  ${WORKSPACE}/setup_live_migration_compute.sh << EOF
 sudo yum install -y libvirt libvirt-devel nfs-utils
 sudo crudini --verbose  --set --inplace /etc/libvirt/libvirtd.conf '' listen_tls 0
@@ -459,7 +477,7 @@ EOF
 global
   daemon
   group  haproxy
-  log  /dev/log local0
+  log  /dev/log local0 debug
   maxconn  20480
   pidfile  /tmp/haproxy.pid
   ssl-default-bind-ciphers  !SSLv2:kEECDH:kRSA:kEDH:kPSK:+3DES:!aNULL:!eNULL:!MD5:!EXP:!RC4:!SEED:!IDEA:!DES
@@ -470,15 +488,15 @@ global
 
 defaults
   log  global
+  option  log-health-checks
   maxconn  4096
   mode  tcp
   retries  3
   timeout  http-request 10s
   timeout  queue 2m
-  timeout  connect 10s
-  timeout  client 2m
-  timeout  server 2m
-  timeout  check 10s
+  timeout  connect 5s
+  timeout  client 5s
+  timeout  server 5s
 
 listen opendaylight
   bind ${haproxy_ip}:8181 transparent
@@ -500,15 +518,14 @@ EOF
 listen opendaylight_ws
   bind ${haproxy_ip}:8185 transparent
   mode http
-  timeout connect 5s
-  timeout client 25s
-  timeout server 25s
   timeout tunnel 3600s
+  option httpchk GET /data-change-event-subscription/neutron:neutron/neutron:ports/datastore=OPERATIONAL/scope=SUBTREE HTTP/1.1\r\nHost:\ ws.opendaylight.org\r\nConnection:\ Upgrade\r\nUpgrade:\ websocket\r\nSec-WebSocket-Key:\ haproxy\r\nSec-WebSocket-Version:\ 13\r\nSec-WebSocket-Protocol:\ echo-protocol
+  http-check expect status 101
 EOF
 
     odlindex=1
     for odlip in ${odl_ips[*]}; do
-        echo "  server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 5 inter 2000 rise 2" >> ${WORKSPACE}/haproxy.cfg
+        echo "  server opendaylight-ws-${odlindex} ${odlip}:8185 check fall 3 inter 1000 rise 2" >> ${WORKSPACE}/haproxy.cfg
         odlindex=$((odlindex+1))
     done
 
@@ -833,6 +850,7 @@ for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
         # but in the meantime do it ourselves
         ssh ${!CONTROLIP} "sudo ovs-vsctl set Open_vSwitch . external_ids:of-tunnel=true"
     fi
+    fix_libvirt_python_build ${!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"
@@ -888,6 +906,7 @@ for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
         # but in the meantime do it ourselves
         ssh ${!COMPUTEIP} "sudo ovs-vsctl set Open_vSwitch . external_ids:of-tunnel=true"
     fi
+    fix_libvirt_python_build ${!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"
@@ -1076,32 +1095,7 @@ else
     HA_PROXY_3_IP=${ODL_SYSTEM_3_IP}
 fi
 
-echo "Locating test plan to use..."
-testplan_filepath="${WORKSPACE}/test/csit/testplans/${STREAMTESTPLAN}"
-if [ ! -f "${testplan_filepath}" ]; then
-    testplan_filepath="${WORKSPACE}/test/csit/testplans/${TESTPLAN}"
-fi
-
-echo "Changing the testplan path..."
-cat "${testplan_filepath}" | sed "s:integration:${WORKSPACE}:" > testplan.txt
-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
+get_test_suites SUITES
 
 #install all client versions required for this job testing
 install_openstack_clients_in_robot_vm
@@ -1123,7 +1117,7 @@ EOF
 
 source /tmp/os_netvirt_client_rc
 
-echo "Get all versions before executing pybot"
+echo "Get all versions before executing robot"
 echo "openstack --version"
 which openstack
 openstack --version
@@ -1138,7 +1132,7 @@ stacktime=$(timer $totaltmr)
 printf "Stacking elapsed time: %s\n" "${stacktime}"
 
 echo "Starting Robot test suites ${SUITES} ..."
-# please add pybot -v arguments on a single line and alphabetized
+# please add robot -v arguments on a single line and alphabetized
 suite_num=0
 for suite in ${SUITES}; do
     # prepend an incremental counter to the suite name so that the full robot log combining all the suites as is done
@@ -1147,7 +1141,7 @@ for suite in ${SUITES}; do
     suite_index="$(printf %02d ${suite_num})"
     suite_name="$(basename ${suite} | cut -d. -f1)"
     log_name="${suite_index}_${suite_name}"
-    pybot -N ${log_name} \
+    robot -N ${log_name} \
     -c critical -e exclude -e skip_if_${DISTROSTREAM} \
     --log log_${log_name}.html --report report_${log_name}.html --output output_${log_name}.xml \
     --removekeywords wuks \
@@ -1201,6 +1195,7 @@ for suite in ${SUITES}; do
     -v TOOLS_SYSTEM_IP:${TOOLS_SYSTEM_1_IP} \
     -v TOOLS_SYSTEM_1_IP:${TOOLS_SYSTEM_1_IP} \
     -v TOOLS_SYSTEM_2_IP:${TOOLS_SYSTEM_2_IP} \
+    -v TOOLS_SYSTEM_3_IP:${TOOLS_SYSTEM_3_IP} \
     -v USER_HOME:${HOME} \
     -v WORKSPACE:/tmp \
     ${TESTOPTIONS} ${suite} || true