Whamcloud - gitweb
LU-15465 tests: conf-sanity failed with code 95 36/46236/3
authorElena Gryaznova <elena.gryaznova@hpe.com>
Fri, 21 Jan 2022 07:24:28 +0000 (10:24 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 31 Jan 2022 01:36:47 +0000 (01:36 +0000)
conf-sanity tests 27b, 47 and 84 (the tests execute 'fail mds1' and
then 'cleanup' at the end of test) failed with code EOPNOTSUPP because
of 'set -e' and lfs df <non_lustre> return code 95.
The scenario:
test_27b () {
  facet_failover $SINGLEMDS
    change_active mds1
  ...
  cleanup -> umount_client $MOUNT
}
formatall
  stopall
    activemds=`facet_active mds1`
    if [ $activemds != "mds1" ]; then
       fail mds1
         clients_up
           lfs_df_check
             + local clients=fre0111,fre0112
             + local rc
             + [ -z fre0111,fre0112 ]
             + pdsh -S -w fre0111,fre0112
                 /usr/bin/lfs df /mnt/lustre << lustre not mounted
pdsh@fre0111: fre0111: ssh exited with exit code 95
pdsh@fre0111: fre0112: ssh exited with exit code 95

To reproduce the issue just run:
  ONLY="27b" sh conf-sanity.sh or:
  ONLY="47" sh conf-sanity.sh or:
  ONLY="84" sh conf-sanity.sh

Fixes: 2d714041ba ("LU-8962 lfs: Handle non-lustre and multiple args")
Signed-off-by: Elena Gryaznova <elena.gryaznova@hpe.com>
HPE-bug-id: LUS-10680
Change-Id: Ibbe8d624fe341282f55bf8e5140f6362432d64cf
Reviewed-on: https://review.whamcloud.com/46236
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Vladimir Saveliev <vlaidimir.saveliev@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/test-framework.sh

index d0f94e7..abc2222 100755 (executable)
@@ -3563,20 +3563,15 @@ wait_remote_prog () {
 
 lfs_df_check() {
        local clients=${1:-$CLIENTS}
-       local rc
+       local rc=0
 
        if [ -z "$clients" ]; then
-               $LFS df $MOUNT > /dev/null
-               rc=$?
+               $LFS df $MOUNT > /dev/null || rc=$?
        else
-               $PDSH $clients "$LFS df $MOUNT" > /dev/null
-               rc=$?
+               $PDSH $clients "$LFS df $MOUNT" > /dev/null || rc=$?
        fi
 
        check_lfs_df_ret_val $rc
-       rc=$?
-
-       return $rc
 }
 
 clients_up() {