2 # vim:shiftwidth=4:softtabstop=4:tabstop=4:
5 # Shell routines for logging results to a yaml file.
11 echo "$line" | sed "s/^${host}: //" | sed "s/^${host}://" \
12 >> $logdir/node.$host.yml;
19 if [ -f $logdir/shared ]; then
20 do_rpc_nodes $(comma_list $(all_nodes)) \
21 "yml_node >> $logdir/node.\\\$(hostname -s).yml"
23 do_rpc_nodes $(comma_list $(all_nodes)) yml_node | split_output
41 # Called on the node for which we the info is needed.
53 printf "LustreEntities:\n"
57 TEST_GROUP=${TEST_GROUP:-"acc-sm-$(hostname -s)"}
58 TEST_HOST=${TEST_HOST:-$(hostname -s)}
59 TEST_USER=${TEST_USER:-$USER}
60 TEST_PROJECT=${TEST_PROJECT:-"LUSTRE"}
62 # TestGroup information
65 test_group: $TEST_GROUP
69 project: $TEST_PROJECT
74 echo -e $CODE_REVIEW_YAML
78 rhel_pat=".*release \([[:digit:]]\+\.[[:digit:]]\+\).*"
80 if [ -r /etc/centos-release ]; then
81 version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/centos-release)
82 dist="CentOS ${version}"
83 elif [ -r /etc/redhat-release ]; then
84 version=$(sed -n -e "s/${rhel_pat}/\1/p" /etc/redhat-release)
85 dist="RHEL ${version}"
86 elif [ -r /etc/os-release ]; then
87 name=$(sed -n -e 's/"//g' -e 's/^NAME=//p' /etc/os-release)
88 version=$(sed -n -e 's/"//g' -e 's/^VERSION_ID=//p' \
90 dist="${name} ${version}"
99 local TEST_DISTRO=$(release)
100 local LUSTRE_VERSION=$(lustre_build_version)
101 local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$LUSTRE_VERSION}
102 local FILE_SYSTEM=$(node_fstypes $(hostname -s))
105 lbats_build_id: $LBATS_ID
106 lbats_build_name: $LBATS_NAME
107 architecture: $(uname -m)
109 os_distribution: $TEST_DISTRO
110 version: $LUSTRE_VERSION
112 branch: $LUSTRE_BRANCH
113 revision: $LUSTRE_REVISION
114 kernel_version: $(uname -r)
115 file_system: ${FILE_SYSTEM:-"NA"}
121 mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
123 node_name: $(hostname -s)
125 architecture: $(uname -m)
128 for nw in $(lctl list_nids | grep -v @lo | cut -f 2 -d '@' | uniq); do
146 if ! combined_mgs_mds; then
147 host=$(short_hostname $(facet_active_host mgs))
148 f_host=$(short_hostname $(facet_passive_host mgs))
150 yml_entity "MGS" $host >> $logdir/node.$host.yml
152 yml_entity "MGS" $f_host >> $logdir/node.$f_host.yml
155 for i in $(seq $MDSCOUNT); do
156 host=$(short_hostname $(facet_active_host mds$i))
157 f_host=$(short_hostname $(facet_passive_host mds$i))
159 yml_entity "MDS $i" $host >> $logdir/node.$host.yml
161 yml_entity "MDS $i" $f_host >> $logdir/node.$f_host.yml
164 for i in $(seq $OSTCOUNT); do
165 host=$(short_hostname $(facet_active_host ost$i))
166 f_host=$(short_hostname $(facet_passive_host ost$i))
168 yml_entity "OST $i" $host >> $logdir/node.$host.yml
170 yml_entity "OST $i" $f_host >> $logdir/node.$f_host.yml
174 for host in ${CLIENTS//,/ }; do
175 host=$(short_hostname $host)
176 yml_entity "Client $i" $host >> $logdir/node.$host.yml
182 if [ $1 != "FINISHED" ]; then
186 description: $TESTSUITE $1
194 yml_log_test_status() {
201 yml_log_sub_test_begin() {
208 yml_log_sub_test_end() {
218 printf ' error: "%q"\n' "$*"
222 yml_log_sub_test_log() {