Whamcloud - gitweb
LU-2608 tests: check_catastrophe success on failure to connect
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Tue, 29 Jan 2013 18:46:52 +0000 (13:46 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 13 Feb 2013 22:10:52 +0000 (17:10 -0500)
Allow check_catastrophe to pass on failure to connect to host.
Otherwise LBUG assertions crop up when hosts are overloaded.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Change-Id: Ie873b817911613369a226341d8efe06707b08bc4
Reviewed-on: http://review.whamcloud.com/5200
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Jian Yu <jian.yu@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/test-framework.sh

index 126b44b..c351707 100644 (file)
@@ -4854,9 +4854,17 @@ check_catastrophe() {
 
        [ -z "$rnodes" ] && return 0
 
 
        [ -z "$rnodes" ] && return 0
 
-       do_nodes "$rnodes" "rc=\\\$([ -f $C ] && echo \\\$(< $C) || echo 0);
+       local data
+       data=$(do_nodes "$rnodes" "rc=\\\$([ -f $C ] &&
+               echo \\\$(< $C) || echo 0);
                if [ \\\$rc -ne 0 ]; then echo \\\$(hostname): \\\$rc; fi
                if [ \\\$rc -ne 0 ]; then echo \\\$(hostname): \\\$rc; fi
-               exit \\\$rc;"
+               exit \\\$rc")
+       local rc=$?
+       if [ -n "$data" ]; then
+           echo $data
+           return $rc
+       fi
+       return 0
 }
 
 # CMD: determine mds index where directory inode presents
 }
 
 # CMD: determine mds index where directory inode presents