From b84bc6d895a0a902695726f3c46ce795748456e2 Mon Sep 17 00:00:00 2001 From: Quentin Bouget Date: Tue, 13 Nov 2018 16:52:24 -0500 Subject: [PATCH] LU-11572 tests: make sanity-hsm test_260c reliable When the coordinator restarts, its first run does housekeeping. For the following `loop_period' seconds, it will not run in housekeeping mode. This patch uses this to improve the reliability of sanity-hsm test_260c. Test-Parameters: trivial testlist=sanity-hsm,sanity-hsm,sanity-hsm Signed-off-by: Quentin Bouget Change-Id: I8eeb8b6856d91b69495d592cdd1cb5f091b1cc2b Reviewed-on: https://review.whamcloud.com/33478 Reviewed-by: Ben Evans Reviewed-by: John L. Hammond Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/tests/sanity-hsm.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 4138c45..bbe809e 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -4801,7 +4801,7 @@ test_260c() # Set a few hsm parameters stack_trap \ "set_hsm_param loop_period $(get_hsm_param loop_period)" EXIT - set_hsm_param loop_period 10 + set_hsm_param loop_period 1000 stack_trap \ "set_hsm_param max_requests $(get_hsm_param max_requests)" EXIT set_hsm_param max_requests 3 @@ -4816,6 +4816,10 @@ test_260c() kill_copytools wait_copytools || error "copytools failed to stop" + # Force the next coordinator run to do housekeeping + cdt_shutdown + cdt_enable + "$LFS" hsm_archive "${files[1]}" # Launch a copytool @@ -4823,6 +4827,10 @@ test_260c() copytool setup --archive-id 2 wait_request_state "$(path2fid "${files[1]}")" ARCHIVE SUCCEED + # The coordinator just did a housekeeping run it won't do another one + # for around `loop_period' seconds => requests will not be reordered + # if it costs too much (ie. when the coordinator has to discard a whole + # hal) # Send several archive requests for file in "${files[@]:2}"; do @@ -4854,7 +4862,7 @@ test_260c() done return 0 } -run_test 260c "Restore request have priority over other requests" +run_test 260c "Requests are not reordered on the 'hot' path of the coordinator" test_300() { [ "$CLIENTONLY" ] && skip "CLIENTONLY mode" && return -- 1.8.3.1