echo "Configuring the karaf log... karaf_version: ${karaf_version}, logapi: ${logapi}"
if [ "${logapi}" == "log4j2" ]; then
# FIXME: Make log size limit configurable from build parameter.
+ # From Neon the default karaf file size is 64 MB
+ sed -ie 's/log4j2.appender.rolling.policies.size.size = 64MB/log4j2.appender.rolling.policies.size.size = 1GB/g' ${LOGCONF}
+ # Flourine still uses 16 MB
sed -ie 's/log4j2.appender.rolling.policies.size.size = 16MB/log4j2.appender.rolling.policies.size.size = 1GB/g' ${LOGCONF}
orgmodule="org.opendaylight.yangtools.yang.parser.repo.YangTextSchemaContextResolver"
orgmodule_="${orgmodule//./_}"
# Use the testplan if specific SUITES are not defined.
if [ -z "${SUITES}" ]; then
- suite_list=`egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' '`
+ suite_list=$(egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' testplan.txt | tr '\012' ' ')
else
suite_list=""
workpath="${WORKSPACE}/test/csit/suites"
sleep 5
# FIXME: Do not create .tar and gzip before copying.
- for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}"); do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
echo "collect_logs: for opendaylight controller ip: ${!CONTROLLERIP}"
NODE_FOLDER="odl_${i}"
print_job_parameters > ${WORKSPACE}/archives/params.txt
# Control Node
- for i in `seq 1 ${NUM_OPENSTACK_CONTROL_NODES}`; do
+ for i in $(seq 1 "${NUM_OPENSTACK_CONTROL_NODES}"); do
OSIP=OPENSTACK_CONTROL_NODE_${i}_IP
if [ "$(is_openstack_feature_enabled n-cpu)" == "1" ]; then
echo "collect_logs: for openstack combo node ip: ${!OSIP}"
done
# Compute Nodes
- for i in `seq 1 ${NUM_OPENSTACK_COMPUTE_NODES}`; do
+ for i in $(seq 1 "${NUM_OPENSTACK_COMPUTE_NODES}"); do
OSIP=OPENSTACK_COMPUTE_NODE_${i}_IP
echo "collect_logs: for openstack compute node ip: ${!OSIP}"
NODE_FOLDER="compute_${i}"
function get_nodes_list() {
# Create the string for nodes
- for i in `seq 1 ${NUM_ODL_SYSTEM}` ; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}") ; do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
nodes[$i]=${!CONTROLLERIP}
done
# 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'`
+ ACTUALFEATURES=$(echo "${ACTUALFEATURES}" | tr -d '\n \r')
echo "ACTUALFEATURES: ${ACTUALFEATURES}"
# In the case that we want to install features via karaf shell, a space separated list of
# Copy over the configuration script and configuration files to each controller
# Execute the configuration script on each controller.
function copy_and_run_configuration_script() {
- for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}"); do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
echo "Configuring member-${i} with IP address ${!CONTROLLERIP}"
scp ${WORKSPACE}/configuration-script.sh ${!CONTROLLERIP}:/tmp/
# Copy over the startup script to each controller and execute it.
function copy_and_run_startup_script() {
- for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}"); do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
echo "Starting member-${i} with IP address ${!CONTROLLERIP}"
scp ${WORKSPACE}/startup-script.sh ${!CONTROLLERIP}:/tmp/
function copy_and_run_post_startup_script() {
seed_index=1
- for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}"); do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
echo "Execute the post startup script on controller ${!CONTROLLERIP}"
scp ${WORKSPACE}/post-startup-script.sh ${!CONTROLLERIP}:/tmp
ssh ${!CONTROLLERIP} "bash /tmp/post-startup-script.sh $(( seed_index++ ))"
- if [ $(( $i % ${NUM_ODL_SYSTEM} )) == 0 ]; then
+ if [ $(( i % NUM_ODL_SYSTEM )) == 0 ]; then
seed_index=1
fi
done
function create_controller_variables() {
echo "Generating controller variables..."
- for i in `seq 1 ${NUM_ODL_SYSTEM}`; do
+ for i in $(seq 1 "${NUM_ODL_SYSTEM}"); do
CONTROLLERIP=ODL_SYSTEM_${i}_IP
odl_variables=${odl_variables}" -v ${CONTROLLERIP}:${!CONTROLLERIP}"
echo "Lets's take the karaf thread dump"
local -r rpm_path="$3"
echo "Building OVS ${version} on ${ip} ..."
- cat > ${WORKSPACE}/build_ovs.sh << EOF
+ cat > "${WORKSPACE}"/build_ovs.sh << EOF
set -ex -o pipefail
echo '---> Building openvswitch version ${version}'
rm -rf \${TMP}
EOF
- scp ${WORKSPACE}/build_ovs.sh ${ip}:/tmp
- ${SSH} ${ip} " bash /tmp/build_ovs.sh >> /tmp/install_ovs.txt 2>&1"
- scp -r ${ip}:/tmp/ovs_rpms/* "${rpm_path}/"
- ${SSH} ${ip} "rm -rf /tmp/ovs_rpms"
+ scp "${WORKSPACE}"/build_ovs.sh "${ip}":/tmp
+ ${SSH} "${ip}" " bash /tmp/build_ovs.sh >> /tmp/install_ovs.txt 2>&1"
+ scp -r "${ip}":/tmp/ovs_rpms/* "${rpm_path}/"
+ ${SSH} "${ip}" "rm -rf /tmp/ovs_rpms"
}
# Install OVS RPMs from yum repo
local -r rpm_repo="$2"
echo "Installing OVS from repo ${rpm_repo} on ${ip} ..."
- cat > ${WORKSPACE}/install_ovs.sh << EOF
+ cat > "${WORKSPACE}"/install_ovs.sh << EOF
set -ex -o pipefail
echo '---> Installing openvswitch from ${rpm_repo}'
[ "\${PREV_MOD}" != "\${NEW_MOD}" ] || (echo "Kernel module was not updated" && exit 1)
EOF
- scp ${WORKSPACE}/install_ovs.sh ${ip}:/tmp
- ${SSH} ${ip} "bash /tmp/install_ovs.sh >> /tmp/install_ovs.txt 2>&1"
+ scp "${WORKSPACE}"/install_ovs.sh "${ip}":/tmp
+ ${SSH} "${ip}" "bash /tmp/install_ovs.sh >> /tmp/install_ovs.txt 2>&1"
}
# Install OVS RPMS from path
local -r rpm_path="$2"
echo "Creating OVS RPM repo on ${ip} ..."
- ${SSH} ${ip} "mkdir -p /tmp/ovs_rpms"
- scp -r "${rpm_path}"/* ${ip}:/tmp/ovs_rpms
- ${SSH} ${ip} "sudo yum -y install createrepo && createrepo --database /tmp/ovs_rpms"
- install_ovs_from_repo ${ip} file:/tmp/ovs_rpms
+ ${SSH} "${ip}" "mkdir -p /tmp/ovs_rpms"
+ scp -r "${rpm_path}"/* "${ip}":/tmp/ovs_rpms
+ ${SSH} "${ip}" "sudo yum -y install createrepo && createrepo --database /tmp/ovs_rpms"
+ install_ovs_from_repo "${ip}" file:/tmp/ovs_rpms
}