export logdir=$1
if [ -f $logdir/shared ]; then
- do_rpc_nodes $(comma_list $(nodes_list)) \
+ do_rpc_nodes $(comma_list $(all_nodes)) \
"yml_node >> $logdir/node.\\\$(hostname -s).yml"
else
- do_rpc_nodes $(comma_list $(nodes_list)) yml_node | split_output
+ do_rpc_nodes $(comma_list $(all_nodes)) yml_node | split_output
fi
yml_entities
}
TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname -s)"}
TEST_HOST=${TEST_HOST:-$(hostname -s)}
TEST_USER=${TEST_USER:-$USER}
+ TEST_PROJECT=${TEST_PROJECT:-"LUSTRE"}
# TestGroup information
cat <<EOF
testhost: $TEST_HOST
submission: $(date)
user_name: $TEST_USER
+project: $TEST_PROJECT
EOF
}
}
release() {
- if [ -r /etc/lsb-release ]; then
- dist=$(grep 'DISTRIB_ID' /etc/lsb-release | sed 's/DISTRIB_ID=//' | head -1)
- elif [ -r /etc/redhat-release ]; then
- dist=$(awk '/release/ { printf("%s %s %s", $1, $2, $3)}' /etc/redhat-release)
- elif [ -r /etc/*-release ]; then
- dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null | \
- sed -e 's/\/etc\///' -e 's/-release//' | head -1)
- else
- dist="UNKNOWN"
- fi
-
- echo $dist
+ rhel_pat=".*release \([[:digit:]]\+\.[[:digit:]]\+\).*"
+
+ if [ -r /etc/centos-release ]; then
+ version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/centos-release)
+ dist="CentOS ${version}"
+ elif [ -r /etc/redhat-release ]; then
+ version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/redhat-release)
+ dist="RHEL ${version}"
+ elif [ -r /etc/os-release ]; then
+ name=$(sed -n -e 's/"//g' -e 's/^NAME=//p' /etc/os-release)
+ version=$(sed -n -e 's/"//g' -e 's/^VERSION_ID=//p' \
+ /etc/os-release)
+ dist="${name} ${version}"
+ else
+ dist="UNKNOWN"
+ fi
+
+ echo $dist
}
yml_build_info() {
- TEST_DISTRO=$(release)
- LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
- LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)}
+ local TEST_DISTRO=$(release)
+ local LUSTRE_VERSION=$(lustre_build_version)
+ local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$LUSTRE_VERSION}
+ local FILE_SYSTEM=$(node_fstypes $(hostname -s))
cat <<EOF
lbats_build_id: $LBATS_ID
architecture: $(uname -m)
os: $(uname -o)
os_distribution: $TEST_DISTRO
- lustre_version: $LUSTRE_VERSION
- lustre_build: $LUSTRE_BUILD
+ version: $LUSTRE_VERSION
+ build: $LUSTRE_BUILD
+ branch: $LUSTRE_BRANCH
+ revision: $LUSTRE_REVISION
kernel_version: $(uname -r)
+ file_system: ${FILE_SYSTEM:-"NA"}
EOF
}
}
yml_entities() {
- local host
- for num in $(seq $MDSCOUNT); do
- host=$(short_hostname $(facet_active_host mds$num))
- yml_entity "MDS $num" $host >> $logdir/node.$host.yml
- done
-
- for num in $(seq $OSTCOUNT); do
- host=$(short_hostname $(facet_active_host ost$num))
- yml_entity "OST $num" $host >> $logdir/node.$host.yml
- done
-
- i=1
- for host in ${CLIENTS//,/ }; do
- host=$(short_hostname $host)
- yml_entity "Client $i" $host >> $logdir/node.$host.yml
- i=$((i+1))
- done
+ local host
+ local f_host
+ local i
+
+ if ! combined_mgs_mds; then
+ host=$(short_hostname $(facet_active_host mgs))
+ f_host=$(short_hostname $(facet_passive_host mgs))
+
+ yml_entity "MGS" $host >> $logdir/node.$host.yml
+ [[ -n $f_host ]] &&
+ yml_entity "MGS" $f_host >> $logdir/node.$f_host.yml
+ fi
+
+ for i in $(seq $MDSCOUNT); do
+ host=$(short_hostname $(facet_active_host mds$i))
+ f_host=$(short_hostname $(facet_passive_host mds$i))
+
+ yml_entity "MDS $i" $host >> $logdir/node.$host.yml
+ [[ -n $f_host ]] &&
+ yml_entity "MDS $i" $f_host >> $logdir/node.$f_host.yml
+ done
+
+ for i in $(seq $OSTCOUNT); do
+ host=$(short_hostname $(facet_active_host ost$i))
+ f_host=$(short_hostname $(facet_passive_host ost$i))
+
+ yml_entity "OST $i" $host >> $logdir/node.$host.yml
+ [[ -n $f_host ]] &&
+ yml_entity "OST $i" $f_host >> $logdir/node.$f_host.yml
+ done
+
+ i=1
+ for host in ${CLIENTS//,/ }; do
+ host=$(short_hostname $host)
+ yml_entity "Client $i" $host >> $logdir/node.$host.yml
+ i=$((i+1))
+ done
}
yml_log_test() {