Rework the way Java version is set in CSIT jobs
[releng/builder.git] / jjb / integration / include-raw-integration-deploy-controller.sh
index 5a0e8debb05ebada1f54e263e50ccbafa74df8c9..d9ac4da92cc3f31963efb585c3164bfb7ae4c475 100644 (file)
@@ -10,6 +10,9 @@ if [ ${CONTROLLERSCOPE} == 'all' ]; then
 else
     ACTUALFEATURES="${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'`
 
 cat > ${WORKSPACE}/deploy-controller-script.sh <<EOF
 
@@ -30,7 +33,9 @@ cat \${FEATURESCONF}
 
 echo "Configuring the log..."
 LOGCONF=/tmp/${BUNDLEFOLDER}/etc/org.ops4j.pax.logging.cfg
-sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=20MB/g' \${LOGCONF}
+sed -ie 's/log4j.appender.out.maxBackupIndex=10/log4j.appender.out.maxBackupIndex=1/g' \${LOGCONF}
+# FIXME: Make log size limit configurable from build parameter.
+sed -ie 's/log4j.appender.out.maxFileSize=1MB/log4j.appender.out.maxFileSize=100GB/g' \${LOGCONF}
 cat \${LOGCONF}
 
 echo "Configure max memory..."
@@ -38,18 +43,14 @@ MEMCONF=/tmp/${BUNDLEFOLDER}/bin/setenv
 sed -ie 's/JAVA_MAX_MEM="2048m"/JAVA_MAX_MEM="${CONTROLLERMEM}"/g' \${MEMCONF}
 cat \${MEMCONF}
 
-echo "Listing all open ports on controller system"
-netstat -natu
-
 EOF
 
-ODL_SYSTEM_IPS=(${ODL_SYSTEM_1_IP} ${ODL_SYSTEM_2_IP} ${ODL_SYSTEM_3_IP})
-for i in "${!ODL_SYSTEM_IPS[@]}"
+for i in `seq 1 ${NUM_ODL_SYSTEM}`
 do
-    echo "Installing distribution in member-$((i+1)) with IP address ${ODL_SYSTEM_IPS[$i]}"
-    scp ${WORKSPACE}/deploy-controller-script.sh ${ODL_SYSTEM_IPS[$i]}:/tmp
-    ssh ${ODL_SYSTEM_IPS[$i]} 'bash /tmp/deploy-controller-script.sh'
+    CONTROLLERIP=ODL_SYSTEM_${i}_IP 
+    echo "Installing distribution in member-${i} with IP address ${!CONTROLLERIP}"
+    scp ${WORKSPACE}/deploy-controller-script.sh ${!CONTROLLERIP}:/tmp
+    ssh ${!CONTROLLERIP} 'bash /tmp/deploy-controller-script.sh'
 done
 
 # vim: ts=4 sw=4 sts=4 et ft=sh :
-