Whamcloud - gitweb
LU-11572 tests: make sanity-hsm test_260c reliable 78/33478/5
authorQuentin Bouget <quentin.bouget@cea.fr>
Tue, 13 Nov 2018 21:52:24 +0000 (16:52 -0500)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Nov 2018 04:57:34 +0000 (04:57 +0000)
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 <quentin.bouget@cea.fr>
Change-Id: I8eeb8b6856d91b69495d592cdd1cb5f091b1cc2b
Reviewed-on: https://review.whamcloud.com/33478
Reviewed-by: Ben Evans <bevans@cray.com>
Reviewed-by: John L. Hammond <jhammond@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity-hsm.sh

index 4138c45..bbe809e 100755 (executable)
@@ -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