# save the active host for this facet
local activevar=${facet}active
echo "$activevar=${!activevar}" > $TMP/$activevar
+ [[ $facet = mds1 ]] && combined_mgs_mds && \
+ echo "mgsactive=${!activevar}" > $TMP/mgsactive
local TO=`facet_active_host $facet`
echo "Failover $facet to $TO"
done
# make sure its not already running
stop ${facet} -f
rm -f $TMP/${facet}active
+ [[ $facet = mds1 ]] && combined_mgs_mds && rm -f $TMP/mgsactive
do_facet ${facet} $MKFS $*
}
facet_mntpt () {
local facet=$1
+ [[ $facet = mgs ]] && combined_mgs_mds && facet="mds1"
+
local var=${facet}_MOUNT
eval mntpt=${!var:-${MOUNT%/*}/$facet}
stop mds$num -f
rm -f ${TMP}/mds${num}active
done
+ combined_mgs_mds && rm -f $TMP/mgsactive
for num in `seq $OSTCOUNT`; do
stop ost$num -f
run_one_logged() {
local BEFORE=`date +%s`
local TEST_ERROR
- local name=${TESTSUITE}.test_${1}.test_log.$(hostname).log
+ local name=${TESTSUITE}.test_${1}.test_log.$(hostname -s).log
local test_log=$LOGDIR/$name
rm -rf $LOGDIR/err
+ local SAVE_UMASK=`umask`
+ umask 0022
echo
log_sub_test_begin test_${1}
$FAIL_ON_ERROR && exit $RC
fi
+ umask $SAVE_UMASK
+
return 0
}
if [ "$CLIENTONLY" -o "$PDSH" == "no_dsh" ]; then
echo "Dumping logs only on local client."
- $LCTL dk > ${prefix}.debug_log.$(hostname).${suffix}
- dmesg > ${prefix}.dmesg.$(hostname).${suffix}
+ $LCTL dk > ${prefix}.debug_log.$(hostname -s).${suffix}
+ dmesg > ${prefix}.dmesg.$(hostname -s).${suffix}
return
fi
do_nodesv $list \
- "$LCTL dk > ${prefix}.debug_log.\\\$(hostname).${suffix};
- dmesg > ${prefix}.dmesg.\\\$(hostname).${suffix}"
+ "$LCTL dk > ${prefix}.debug_log.\\\$(hostname -s).${suffix};
+ dmesg > ${prefix}.dmesg.\\\$(hostname -s).${suffix}"
if [ ! -f $LOGDIR/shared ]; then
do_nodes $list rsync -az "${prefix}.*.${suffix}" $HOSTNAME:$LOGDIR
fi
# Not found. Create local logdir
mkdir -p $dir
else
- touch $dir/node.$(hostname).yml
+ touch $dir/node.$(hostname -s).yml
fi
return 0
}
check_write_access() {
local dir=$1
for node in $(nodes_list); do
- if [ ! -f "$dir/node.${node}.yml" ]; then
+ if [ ! -f "$dir/node.$(short_hostname ${node}).yml" ]; then
# Logdir not accessible/writable from this node.
return 1
fi
if [[ -n $YAML_LOG ]]; then
return
fi
+ local SAVE_UMASK=`umask`
+ umask 0000
+
export YAML_LOG=${LOGDIR}/results.yml
mkdir -p $LOGDIR
init_clients_lists
yml_nodes_file $LOGDIR >> $YAML_LOG
yml_results_file >> $YAML_LOG
+
+ umask $SAVE_UMASK
}
log_test() {
min_ost_size () {
$LCTL get_param -n osc.*.kbytesavail | sort -n | head -n1
}
-