mars/test_suite/default-main.conf

114 lines
4.0 KiB
Bash

#!/bin/bash
# Copyright 2010-2013 Frank Liepold / 1&1 Internet AG
#
# Email: frank.liepold@1und1.de
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#####################################################################
## the base directory of all .sh and .conf files
main_base_directory=/home/fl/mars/test_suite
## hosts the tests are running on. The first host is initially always used as
## primary host
main_host_list=("istore-test-bs4" "istore-test-bap4")
## file to implement a primitive locking mechanism to avoid concurrent runs
## of the test suite on the same host
declare -g -A main_lock_file_list
## if main_host_list is changed in a *.conf file we need to recompute the values
## of all dependent globals.
function main_set_globals_depending_on_main_host_list
{
eval main_lock_file_list=($(for h in "${main_host_list[@]}";do printf "[$h]=/tmp/test-suite_on.$h ";done))
# see default-cluster.conf
# we construct the expression cluster_mars_dir_lv_name_list=([host-1]=$cluster_mars_dir_lv [host-2]=$cluster_mars_dir_lv ...)
if declare -p cluster_mars_dir_lv_name_list 2>/dev/null |\
grep 'declare -A' >/dev/null
then
eval cluster_mars_dir_lv_name_list=($(x=(${main_host_list[@]/#/[}); y=(${x[@]/%/]=$cluster_mars_dir_lv}); echo ${y[@]}))
fi
}
main_set_globals_depending_on_main_host_list
## errorcode to prevent lib_exit from removing lock files
## (main_lock_file_list)
main_prevent_remove_lock_files_code=42
## host indexed list of bootloaders. In case of lilo we check after installing
## a kernel, that the label given in main_host_bootloader_label_list exists
## in /etc/lilo.conf and call lilo -R <label>. For all other bootloaders we do
## nothing. It's your responsibility to boot the correct kernel.
declare -g -A main_host_bootloader_list
main_host_bootloader_list=(\
[istore-test-bs7]=grub \
[istore-test-bap7]=lilo \
[istore-test-bs4]=lilo \
[istore-test-bap4]=lilo \
[istore-test-bs2]=lilo \
[ovzd-test-bs1]=grub \
[ovzd-test-bap1]=grub \
)
declare -g -A main_host_bootloader_label_list
main_host_bootloader_label_list=(\
[istore-test-bs7]=no_label \
[istore-test-bap7]=mars \
[istore-test-bs4]=mars \
[istore-test-bap4]=mars \
[istore-test-bs2]=mars \
[ovzd-test-bs1]=no_label \
[ovzd-test-bap1]=no_label \
)
## associative array containing functions (as indexes) to be called in case of
## unexpected errors or signals. See also lib_exit
## The values of the array are the parameter lists for the function calls
declare -g -A main_error_recovery_functions
## for batch ssh access from our work station to the involved hosts we need a
## id file without password.
main_ssh_idfile_opt="-i $HOME/.ssh/id_dsa_no_pw"
main_mars_directory="/mars"
## filesystem type of /mars
main_mars_fs_type="ext4"
## egrep patterns to check for messsage categories
main_mars_errmsg_prefix='(XIO|MARS)_error'
main_mars_wrnmsg_prefix='(XIO|MARS)_warn'
## egrep pattern for error messages which are likely to appear only in
## lib_err_total_log_file (5.total.log)
main_errors_only_in_total_log_pattern='[A-Z]_error'
## to be able to kill all scripts started on a remote host these scripts
## must have a fixed pattern in their name
main_prefix_scripts='MARS-TEST-SCRIPT'
## results of checks of symlinks
declare -g -A main_link_status
main_link_status=(["link_ok"]=0 ["link_does_not_exist"]=1 \
["link_has_wrong_value"]=2)