X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fintegration%2Fintegration-configure-clustering.sh;h=43df86444261fc64a570de67c8be94231534ebb7;hb=5d88e73efa841853d06b6c6f7b0484a2319dff95;hp=c6e567b8970e337c17d756c36067395c34cdedae;hpb=0e6889203881aef9548a58cd085c46318cb9a514;p=releng%2Fbuilder.git diff --git a/jjb/integration/integration-configure-clustering.sh b/jjb/integration/integration-configure-clustering.sh index c6e567b89..43df86444 100644 --- a/jjb/integration/integration-configure-clustering.sh +++ b/jjb/integration/integration-configure-clustering.sh @@ -10,134 +10,21 @@ echo "#################################################" echo "## Configure Cluster and Start ##" echo "#################################################" -if [ ${CONTROLLERSCOPE} == 'all' ]; then - ACTUALFEATURES="odl-integration-compatible-with-all,${CONTROLLERFEATURES}" - export CONTROLLERMEM="3072m" -else - ACTUALFEATURES="odl-infrautils-ready,${CONTROLLERFEATURES}" -fi -# Some versions of jenkins job builder result in feature list containing spaces -# and ending in newline. Remove all that. -ACTUALFEATURES=`echo "${ACTUALFEATURES}" | tr -d '\n \r'` +get_features -# Utility function for joining strings. -function join { - delim=' ' - final=$1; shift - - for str in "$@" ; do - final=${final}${delim}${str} - done - - echo ${final} -} - -# 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} +# shellcheck disable=SC2034 +nodes_list=$(get_nodes_list) run_plan "script" -# Create the configuration script to be run on controllers. -cat > ${WORKSPACE}/configuration-script.sh <> ${CUSTOMPROP} - cat ${CUSTOMPROP} -fi - -configure_karaf_log "${KARAF_VERSION}" "${CONTROLLERDEBUGMAP}" - -set_java_vars "${JAVA_HOME}" "${CONTROLLERMEM}" "${MEMCONF}" - -# 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 ${nodes_list} - -echo "Dump akka.conf" -cat ${AKKACONF} - -echo "Dump modules.conf" -cat ${MODULESCONF} - -echo "Dump module-shards.conf" -cat ${MODULESHARDSCONF} - -EOF - -# Create the startup script to be run on controllers. -cat > ${WORKSPACE}/startup-script.sh <