Merge "Revert "Update to global-jjb v0.5.2""
authorThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 25 Jul 2017 21:39:20 +0000 (21:39 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 25 Jul 2017 21:39:20 +0000 (21:39 +0000)
jjb/integration/include-raw-integration-get-slave-addresses.sh
jjb/integration/integration-templates.yaml
jjb/netvirt/netvirt-csit-hwvtep-openstack.yaml
jjb/netvirt/netvirt-csit-multi-openstack.yaml
jjb/netvirt/netvirt-legacy-csit-multi-openstack.yaml
jjb/releng-defaults.yaml

index 22d35bcf6fb93819987ad78eff7813e813bd5bac..d9c571b0f9d570e5c4a2c4628971262de0832618 100644 (file)
@@ -1,9 +1,12 @@
 #!/bin/bash
 # Get the Controller and Tools VM slave addresses
 
+set -x
+
 ODL_SYSTEM=()
 TOOLS_SYSTEM=()
 OPENSTACK_SYSTEM=()
+OPENSTACK_CONTROLLERS=()
 [ "$NUM_OPENSTACK_SITES" ] || NUM_OPENSTACK_SITES=1
 
 OPENSTACK_VENV="/tmp/v/openstack"
@@ -13,6 +16,20 @@ source $OPENSTACK_VENV/bin/activate
 ADDR=($(openstack stack show -f json -c outputs "$STACK_NAME" | \
        jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]'))
 
+# The next two blocks of code will parse the list of vm IP's hostnames to determine which type of node
+# the vm is: odl, devstack controller or compute, ha_proxy or tools. For the odl node's the hsotname will contain
+# java in the name. The tools nodes are anything left after odl and devstack nodes have been found.
+#
+# The devstack nodes are identified with devstack in the hostname but require more checks to determine the controller
+# node. Heat names the vms as devstack-<index> with index starting at 0. The vms are created in groups of which
+# the openstack jobs create a vm_1_group for the controller and vm_2_group for the other vms such as the compute
+# and ha_proxy nodes. The list of IP addresses for all the created vms is returned in reverse order of the group
+# creation, but ordered within the group. I.E vm_1_group will be created first and named devstack-0, followed by
+# vm_2_group and named devstack-0, devstack-1 and devstack-2. The list of IPs will be: devstack-0 (vm_2_group, compute),
+# devstack-1, devstack-2, devstack-0 (vm_1_group, controller). Notice both the compute and first control node are both
+# named devstack-0. We know the controller because it would be last in the list of IPs. This first block of code will
+# produce two lists: one for the list of potential controllers and the second is a list of all devstack nodes.
+
 for i in "${ADDR[@]}"
 do
     REMHOST=$(ssh "${i}" hostname)
@@ -21,6 +38,11 @@ do
        ODL_SYSTEM=( "${ODL_SYSTEM[@]}" "${i}" )
        ;;
     *devstack*)
+       # track potential controllers which would have -0 at the end of the hostname
+       if [[ ${REMHOST: -2} == "-0" ]]; then
+          OPENSTACK_CONTROLLERS=( "${OPENSTACK_CONTROLLERS[@]}" "${i}" )
+       fi
+
        OPENSTACK_SYSTEM=( "${OPENSTACK_SYSTEM[@]}" "${i}" )
        ;;
     *)
@@ -40,6 +62,21 @@ else
 fi
 echo "NUM_OPENSTACK_SYSTEM=${NUM_OPENSTACK_SYSTEM}" >> slave_addresses.txt
 
+# Rearrange the devstack node list to place the controller at the beginning of the list. The later code expects
+# the list to be ordered with controller first followed by other types.
+#
+# At this point there is a list of potential devstack controllers as: devstack-0 (vm_2_group, compute),
+# devstack-0 (vm_1_group, controller) and there is the full list with other compute or ha_proxy nodes in the middle.
+# We know the controller is at the end of the devstack nodes list based on the ordering described above. Swap that entry
+# with the first entry.
+if [ ${#OPENSTACK_CONTROLLERS[@]} -eq 2 ]; then
+    ctrl_index=${#OPENSTACK_SYSTEM[@]}
+    ctrl_index=$((ctrl_index -1))
+    tmp_addr=${OPENSTACK_SYSTEM[0]}
+    OPENSTACK_SYSTEM[0]=${OPENSTACK_SYSTEM[$ctrl_index]}
+    OPENSTACK_SYSTEM[$ctrl_index]=$tmp_addr
+fi
+
 # Add alias for ODL_SYSTEM_1_IP as ODL_SYSTEM_IP
 echo "ODL_SYSTEM_IP=${ODL_SYSTEM[0]}" >> slave_addresses.txt
 for i in $(seq 0 $(( ${#ODL_SYSTEM[@]} - 1 )))
@@ -78,4 +115,6 @@ for i in $(seq 0 $((NUM_OPENSTACK_HAPROXY_NODES - 1)))
 do
     echo "OPENSTACK_HAPROXY_$((i+1))_IP=${OPENSTACK_SYSTEM[$((openstack_index++))]}" >> slave_addresses.txt
 done
+echo "Contents of slave_addresses.txt:"
+cat slave_addresses.txt
 # vim: sw=4 ts=4 sts=4 et ft=sh :
index 7dae0a2d8ed70064705dadbbb431bef4224a22c2..b62b09ccfd8445b50b98387f5701630baccdf1f0 100644 (file)
       - timed: '{schedule}'
 
     builders:
-      - integration-infra-stack:
+      - integration-infra-stack-3-type:
           stack-template: '{stack-template}'
           vm_0_count: '{odl_system_count}'
           vm_0_flavor: '{odl_system_flavor}'
           vm_1_count: '{openstack_system_count}'
           vm_1_flavor: '{openstack_system_flavor}'
           vm_1_image: '{openstack_system_image}'
+          vm_2_count: '{openstack_system2_count}'
+          vm_2_flavor: '{openstack_system2_flavor}'
+          vm_2_image: '{openstack_system2_image}'
       - integration-install-robotframework
       - inject:
           properties-file: 'env.properties'
index b5f6273158b644d8ea454b8160c1d3c3dd27f4d1..c9ec664e3008132a816160b97b1e2f1a00961520 100644 (file)
@@ -8,12 +8,14 @@
 
     topology:
       - 1node:
-          openstack_system_count: 3
+          openstack_system_count: 1
+          openstack_system2_count: 2
           odl_system_count: 1
           enable-haproxy: 'no'
           install-features: 'odl-netvirt-openstack'
       - 3node:
-          openstack_system_count: 4
+          openstack_system_count: 1
+          openstack_system2_count: 3
           odl_system_count: 3
           enable-haproxy: 'yes'
           install-features: 'odl-jolokia,odl-netvirt-openstack'
index bc2ecbb758e05a8516597fd19ace123b7dc7f2e8..bc5352dd8245d1143eda0091ff4e6b537e7f7ae8 100644 (file)
@@ -9,12 +9,14 @@
 
     topology:
       - 1node:
-          openstack_system_count: 3
+          openstack_system_count: 1
+          openstack_system2_count: 2
           odl_system_count: 1
           enable-haproxy: 'no'
           install-features: 'odl-netvirt-openstack'
       - 3node:
-          openstack_system_count: 4
+          openstack_system_count: 1
+          openstack_system2_count: 3
           odl_system_count: 3
           enable-haproxy: 'yes'
           install-features: 'odl-jolokia,odl-netvirt-openstack'
 
     topology:
       - 1node:
-          openstack_system_count: 3
+          openstack_system_count: 1
+          openstack_system2_count: 2
+          stack-template: 'csit-3-instance-type.yaml'
           odl_system_count: 1
           enable-haproxy: 'no'
           install-features: 'odl-netvirt-openstack'
       - 3node:
-          openstack_system_count: 4
+          openstack_system_count: 1
+          openstack_system2_count: 3
           odl_system_count: 3
           enable-haproxy: 'yes'
           install-features: 'odl-jolokia,odl-netvirt-openstack'
           openstack-branch: 'stable/newton'
           odl-ml2-branch: 'stable/newton'
           openstack_system_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+          openstack_system2_image: 'CentOS 7 - devstack-newton - 20170707-0359'
       - newton-nodl-v2:
           openstack-branch: 'stable/newton'
           odl-ml2-branch: 'stable/newton'
           odl-ml2-driver-version: 'v2'
           openstack_system_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+          openstack_system2_image: 'CentOS 7 - devstack-newton - 20170707-0359'
       - ocata:
           openstack-branch: 'stable/ocata'
           odl-ml2-branch: 'stable/ocata'
           odl-ml2-driver-version: 'v2'
           openstack_system_image: 'CentOS 7 - devstack-newton - 20170707-0359'
+          openstack_system2_image: 'CentOS 7 - devstack-newton - 20170707-0359'
 
     security-group-mode: '{sg-mode}'
 
 
     topology:
       - 1node:
-          openstack_system_count: 3
+          openstack_system_count: 1
+          openstack_system2_count: 2
           odl_system_count: 1
           enable-haproxy: 'no'
           install-features: 'odl-netvirt-sfc'
index c5fc6470d02decabac458845de62e42dd343ff1b..63b886589134340655e0ac62a652837df117fc95 100644 (file)
@@ -9,12 +9,14 @@
 
     topology:
       - 1node:
-          openstack_system_count: 3
+          openstack_system_count: 1
+          openstack_system2_count: 2
           odl_system_count: 1
           enable-haproxy: 'no'
           install-features: 'odl-ovsdb-openstack,decanter-collector-jmx,decanter-appender-elasticsearch'
       - 3node:
-          openstack_system_count: 4
+          openstack_system_count: 1
+          openstack_system2_count: 3
           odl_system_count: 3
           enable-haproxy: 'yes'
           install-features: 'odl-jolokia,odl-ovsdb-openstack,decanter-collector-jmx,decanter-appender-elasticsearch'
index 2c7cc632fa7f5e05dfcb71cae5668236f18697d0..a8d548b599de4adac4d5887ede76272c92c260d1 100644 (file)
@@ -65,6 +65,9 @@
     openstack_system_count: 1
     openstack_system_flavor: 8 GB General Purpose v1
     openstack_system_image: CentOS 7 - devstack - 20170609-0220
+    openstack_system2_count: 0
+    openstack_system2_flavor: 2 GB General Purpose v1
+    openstack_system2_image: CentOS 7 - devstack - 20170609-0220
     tools_system_count: 1
     tools_system_flavor: 2 GB General Purpose v1
     tools_system_image: Ubuntu 14.04 - mininet - 20170609-0220