echo "tempest results not found in ${DEVSTACK_TEMPEST_DIR}/${TESTREPO}/0"
fi
} # collect_netvirt_logs()
+
+# Utility function for joining strings.
+function join() {
+ delim=' '
+ final=$1; shift
+
+ for str in "$@" ; do
+ final=${final}${delim}${str}
+ done
+
+ echo ${final}
+}
+
+function get_nodes_list() {
+ # Create the string for nodes
+ for i in `seq 1 ${NUM_ODL_SYSTEM}` ; do
+ CONTROLLERIP=ODL_SYSTEM_${i}_IP
+ nodes[$i]=${!CONTROLLERIP}
+ done
+
+ nodes_list=$(join "${nodes[@]}")
+ echo ${nodes_list}
+}
SPACE_SEPARATED_FEATURES=$(echo "${ACTUALFEATURES}" | tr ',' ' ')
echo "SPACE_SEPARATED_FEATURES: ${SPACE_SEPARATED_FEATURES}"
+nodes_list=$(get_nodes_list)
+
run_plan "script"
cat > ${WORKSPACE}/configuration-script.sh <<EOF
echo "Listing all open ports on controller system..."
netstat -pnatu
-if [ "${ENABLE_HAPROXY_FOR_NEUTRON}" == "yes" ]; then
-
- # Copy shard file if exists
- if [ -f /tmp/custom_shard_config.txt ]; then
- echo "Custom shard config exists!!!"
- echo "Copying the shard config..."
- cp /tmp/custom_shard_config.txt /tmp/${BUNDLEFOLDER}/bin/
- fi
+# Copy shard file if exists
+if [ -f /tmp/custom_shard_config.txt ]; then
+ echo "Custom shard config exists!!!"
+ echo "Copying the shard config..."
+ cp /tmp/custom_shard_config.txt /tmp/${BUNDLEFOLDER}/bin/
+fi
- echo "Configuring cluster"
- /tmp/${BUNDLEFOLDER}/bin/configure_cluster.sh \$1 \$2
+echo "Configuring cluster"
+/tmp/${BUNDLEFOLDER}/bin/configure_cluster.sh \$1 ${nodes_list}
- echo "Dump akka.conf"
- cat ${AKKACONF}
+echo "Dump akka.conf"
+cat ${AKKACONF}
- echo "Dump modules.conf"
- cat ${MODULESCONF}
+echo "Dump modules.conf"
+cat ${MODULESCONF}
- echo "Dump module-shards.conf"
- cat ${MODULESHARDSCONF}
-fi
+ echo "Dump module-shards.conf"
+ cat ${MODULESHARDSCONF}
EOF
# cat > ${WORKSPACE}/configuration-script.sh <<EOF
EOF
# cat > ${WORKSPACE}/post-startup-script.sh <<EOF
-[ "$NUM_OPENSTACK_SITES" ] || NUM_OPENSTACK_SITES=1
-NUM_ODLS_PER_SITE=$((NUM_ODL_SYSTEM / NUM_OPENSTACK_SITES))
-for i in `seq 1 ${NUM_OPENSTACK_SITES}`
+# Copy over the configuration script and configuration files to each controller
+# Execute the configuration script on each controller.
+for i in `seq 1 ${NUM_ODL_SYSTEM}`
do
- # Get full list of ODL nodes for this site
- odl_node_list=
- for j in `seq 1 ${NUM_ODLS_PER_SITE}`
- do
- odl_ip=ODL_SYSTEM_$(((i - 1) * NUM_ODLS_PER_SITE + j))_IP
- odl_node_list="${odl_node_list} ${!odl_ip}"
- done
-
- for j in `seq 1 ${NUM_ODLS_PER_SITE}`
- do
- odl_ip=ODL_SYSTEM_$(((i - 1) * NUM_ODLS_PER_SITE + j))_IP
- # Copy over the config script to controller and execute it (parameters are used only for cluster)
- echo "Execute the configuration script on controller ${!odl_ip} for index $j with node list ${odl_node_list}"
- scp ${WORKSPACE}/configuration-script.sh ${!odl_ip}:/tmp
- ssh ${!odl_ip} "bash /tmp/configuration-script.sh ${j} '${odl_node_list}'"
- done
+ CONTROLLERIP=ODL_SYSTEM_${i}_IP
+ echo "Configuring member-${i} with IP address ${!CONTROLLERIP}"
+ scp ${WORKSPACE}/configuration-script.sh ${!CONTROLLERIP}:/tmp/
+ ssh ${!CONTROLLERIP} "bash /tmp/configuration-script.sh ${i}"
done
run_plan "config"