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}
61 # TestGroup information
64 test_group: $TEST_GROUP
72 echo -e $CODE_REVIEW_YAML
76 if [ -r /etc/lsb-release ]; then
77 dist=$(sed -ne '/^DISTRIB_ID/s/DISTRIB_ID=//p' /etc/lsb-release)
78 elif [ -r /etc/redhat-release ]; then
79 dist=$(awk '/release/ { printf("%s %s %s", $1, $2, $3) }' \
81 elif [ -r /etc/*-release ]; then
82 dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null |
83 sed -e 's/\/etc\///' -e 's/-release//' | head -n1)
92 local TEST_DISTRO=$(release)
93 local LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
94 local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)}
95 local FILE_SYSTEM=$(node_fstypes $(hostname -s))
98 lbats_build_id: $LBATS_ID
99 lbats_build_name: $LBATS_NAME
100 architecture: $(uname -m)
102 os_distribution: $TEST_DISTRO
103 lustre_version: $LUSTRE_VERSION
104 lustre_build: $LUSTRE_BUILD
105 lustre_branch: $LUSTRE_BRANCH
106 lustre_revision: $LUSTRE_REVISION
107 kernel_version: $(uname -r)
108 file_system: ${FILE_SYSTEM:-"NA"}
114 mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
116 node_name: $(hostname -s)
118 architecture: $(uname -m)
121 for nw in $(lctl list_nids | grep -v @lo | cut -f 2 -d '@' | uniq); do
139 if ! combined_mgs_mds; then
140 host=$(short_hostname $(facet_active_host mgs))
141 f_host=$(short_hostname $(facet_passive_host mgs))
143 yml_entity "MGS" $host >> $logdir/node.$host.yml
145 yml_entity "MGS" $f_host >> $logdir/node.$f_host.yml
148 for i in $(seq $MDSCOUNT); do
149 host=$(short_hostname $(facet_active_host mds$i))
150 f_host=$(short_hostname $(facet_passive_host mds$i))
152 yml_entity "MDS $i" $host >> $logdir/node.$host.yml
154 yml_entity "MDS $i" $f_host >> $logdir/node.$f_host.yml
157 for i in $(seq $OSTCOUNT); do
158 host=$(short_hostname $(facet_active_host ost$i))
159 f_host=$(short_hostname $(facet_passive_host ost$i))
161 yml_entity "OST $i" $host >> $logdir/node.$host.yml
163 yml_entity "OST $i" $f_host >> $logdir/node.$f_host.yml
167 for host in ${CLIENTS//,/ }; do
168 host=$(short_hostname $host)
169 yml_entity "Client $i" $host >> $logdir/node.$host.yml
175 if [ $1 != "FINISHED" ]; then
179 description: $TESTSUITE $1
187 yml_log_test_status() {
194 yml_log_sub_test_begin() {
201 yml_log_sub_test_end() {
211 printf ' error: "%q"\n' "$*"
215 yml_log_sub_test_log() {