If the LFSCK has been started before calling "lfsck_start"
to start it, the test shouldn't fail for starting LFSCK.
Test-Parameters: trivial testlist=sanity-lfsck
Signed-off-by: Hongchao Zhang <hongchao@whamcloud.com>
Change-Id: I266d9e2b9c5f37eb9e08b489fab428268b90d895
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48018
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
#define OBD_FAIL_LFSCK_DELAY2 0x1601
do_facet $SINGLEMDS $LCTL set_param fail_loc=0x1601
- $START_NAMESPACE ||
+ $START_NAMESPACE
+ sleep 1
+ [ -n "$($SHOW_NAMESPACE |
+ grep -E "status: init|status: completed")" ] && {
+ $START_NAMESPACE ||
namespace_error "(16) Fail to start LFSCK for namespace!"
+ } || echo "lfsck for namespace has been started"
STATUS=$($SHOW_NAMESPACE | awk '/^status/ { print $2 }')
[ "$STATUS" == "scanning-phase1" ] ||