From 0738df6d242786b662e0b32c0c959ee0a84c7d50 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Wed, 20 Nov 2024 20:08:15 +0300 Subject: [PATCH] LU-12706 tests: sanity-quota_4a fix Don't set force_sync for OST0000 as we are checking inode limit that is not affected by the OST usage. Forced sync at OST0000 might take some time to be finished and break the logic of a test case. Createmany creates files in a directory on MDT0, so don't sync all mdts, only MDT0. Test-Parameters: testlist=sanity-quota env=ONLY=4a,ONLY_REPEAT=200 Fixes: b86c88383f ("LU-12706 tests: sanity-quota 4a sync timeout fix") Signed-off-by: Sergey Cheremencev Change-Id: If411429d8a1e968ebd554242db4b47b0c9421bf6 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57088 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- lustre/tests/sanity-quota.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh index f2b1c31..41fc236 100755 --- a/lustre/tests/sanity-quota.sh +++ b/lustre/tests/sanity-quota.sh @@ -1763,8 +1763,7 @@ test_file_soft() { quota_error a $TSTUSR "create failure, but expect success" local trigger_time=$(date +%s) - sync_all_data_mdts || true - do_facet ost1 "lctl set_param -n osd*.*OST0000.force_sync=1" + do_facet mds1 $LCTL set_param -n osd*.*MDT0000.force_sync=1 local cur_time=$(date +%s) [ $(($cur_time - $trigger_time)) -ge $grace ] && @@ -1775,8 +1774,7 @@ test_file_soft() { $RUNAS touch ${TESTFILE}_before || quota_error a $TSTUSR "failed create before timer expired," \ "but expect success. $trigger_time, $cur_time" - sync_all_data_mdts || true - do_facet ost1 "lctl set_param -n osd*.*OST0000.force_sync=1" + do_facet mds1 $LCTL set_param -n osd*.*MDT0000.force_sync=1 wait_grace_time $qtype "file" @@ -1792,8 +1790,7 @@ test_file_soft() { $RUNAS createmany -m ${TESTFILE}_after_3 $((SOFT_LIMIT + 1)) && quota_error a $TSTUSR "create after timer expired," \ "but expect EDQUOT" - sync_all_data_mdts || true - do_facet ost1 "lctl set_param -n osd*.*OST0000.force_sync=1" + do_facet mds1 $LCTL set_param -n osd*.*MDT0000.force_sync=1 $SHOW_QUOTA_USER $SHOW_QUOTA_GROUP @@ -1810,8 +1807,7 @@ test_file_soft() { $RUNAS touch ${TESTFILE}_xxx || quota_error a $TSTUSR "touch after timer stop failure," \ "but expect success" - sync_all_data_mdts || true - do_facet ost1 "lctl set_param -n osd*.*OST0000.force_sync=1" + do_facet mds1 $LCTL set_param -n osd*.*MDT0000.force_sync=1 # cleanup cleanup_quota_test -- 1.8.3.1