2 # vim:expandtab: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 $(nodes_list)) \
21 "yml_node >> $logdir/node.\\\$(hostname -s).yml"
23 do_rpc_nodes $(comma_list $(nodes_list)) 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 TEST_DISTRO=$(release)
92 LUSTRE_VERSION=$(lctl lustre_build_version | awk '/Lustre version:/ {print $3}')
93 LUSTRE_BUILD=${LUSTRE_BUILD_SOURCE:-$(sed 's/-.*//' <<<$LUSTRE_VERSION)}
96 lbats_build_id: $LBATS_ID
97 lbats_build_name: $LBATS_NAME
98 architecture: $(uname -m)
100 os_distribution: $TEST_DISTRO
101 lustre_version: $LUSTRE_VERSION
102 lustre_build: $LUSTRE_BUILD
103 kernel_version: $(uname -r)
109 mem=$(awk '/MemTotal:/ {print $2 " " $3}' /proc/meminfo)
111 node_name: $(hostname -s)
113 architecture: $(uname -m)
116 for nw in $(lctl list_nids | grep -v @lo | cut -f 2 -d '@' | uniq); do
131 for num in $(seq $MDSCOUNT); do
132 host=$(short_hostname $(facet_active_host mds$num))
133 yml_entity "MDS $num" $host >> $logdir/node.$host.yml
136 for num in $(seq $OSTCOUNT); do
137 host=$(short_hostname $(facet_active_host ost$num))
138 yml_entity "OST $num" $host >> $logdir/node.$host.yml
142 for host in ${CLIENTS//,/ }; do
143 host=$(short_hostname $host)
144 yml_entity "Client $i" $host >> $logdir/node.$host.yml
150 if [ $1 != "FINISHED" ]; then
154 description: $TESTSUITE $1
162 yml_log_test_status() {
169 yml_log_sub_test_begin() {
176 yml_log_sub_test_end() {
186 printf ' error: "%q"\n' "$*"
190 yml_log_sub_test_log() {