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=$(grep 'DISTRIB_ID' /etc/lsb-release | sed 's/DISTRIB_ID=//' | head -1)
78 elif [ -r /etc/redhat-release ]; then
79 dist=$(awk '/release/ { printf("%s %s %s", $1, $2, $3)}' /etc/redhat-release)
80 elif [ -r /etc/*-release ]; then
81 dist=$(find /etc/ -maxdepth 1 -name '*release' 2> /dev/null | \
82 sed -e 's/\/etc\///' -e 's/-release//' | head -1)
91 local TEST_DISTRO=$(release)
92 local LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
93 local LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)}
94 local FILE_SYSTEM=$(node_fstypes $(hostname -s))
97 lbats_build_id: $LBATS_ID
98 lbats_build_name: $LBATS_NAME
99 architecture: $(uname -m)
101 os_distribution: $TEST_DISTRO
102 lustre_version: $LUSTRE_VERSION
103 lustre_build: $LUSTRE_BUILD
104 lustre_branch: $LUSTRE_BRANCH
105 lustre_revision: $LUSTRE_REVISION
106 kernel_version: $(uname -r)
107 file_system: ${FILE_SYSTEM:-"NA"}
113 mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
115 node_name: $(hostname -s)
117 architecture: $(uname -m)
120 for nw in $(lctl list_nids | grep -v @lo | cut -f 2 -d '@' | uniq); do
138 if ! combined_mgs_mds; then
139 host=$(short_hostname $(facet_active_host mgs))
140 f_host=$(short_hostname $(facet_passive_host mgs))
142 yml_entity "MGS" $host >> $logdir/node.$host.yml
144 yml_entity "MGS" $f_host >> $logdir/node.$f_host.yml
147 for i in $(seq $MDSCOUNT); do
148 host=$(short_hostname $(facet_active_host mds$i))
149 f_host=$(short_hostname $(facet_passive_host mds$i))
151 yml_entity "MDS $i" $host >> $logdir/node.$host.yml
153 yml_entity "MDS $i" $f_host >> $logdir/node.$f_host.yml
156 for i in $(seq $OSTCOUNT); do
157 host=$(short_hostname $(facet_active_host ost$i))
158 f_host=$(short_hostname $(facet_passive_host ost$i))
160 yml_entity "OST $i" $host >> $logdir/node.$host.yml
162 yml_entity "OST $i" $f_host >> $logdir/node.$f_host.yml
166 for host in ${CLIENTS//,/ }; do
167 host=$(short_hostname $host)
168 yml_entity "Client $i" $host >> $logdir/node.$host.yml
174 if [ $1 != "FINISHED" ]; then
178 description: $TESTSUITE $1
186 yml_log_test_status() {
193 yml_log_sub_test_begin() {
200 yml_log_sub_test_end() {
210 printf ' error: "%q"\n' "$*"
214 yml_log_sub_test_log() {