From: Sergey Cheremencev Date: Sun, 16 Nov 2014 12:01:35 +0000 (+0400) Subject: LU-4065 tests: hsm copytool_cleanup improvement X-Git-Tag: 2.7.61~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F83%2F12783%2F5;p=fs%2Flustre-release.git LU-4065 tests: hsm copytool_cleanup improvement hsm shutdown from copytool_cleanup could race with cdt_set_mount_state enabled. Because set_param -P doesn't wait when configuration "params" will be retrieved and applied from server. Xyratex-bug-id: MRP-2037 Change-Id: I2f274c933986439deae04cd252b4dd9c8442ef1f Signed-off-by: Sergey Cheremencev Reviewed-on: http://review.whamcloud.com/12783 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- diff --git a/lustre/tests/sanity-hsm.sh b/lustre/tests/sanity-hsm.sh index 172170d..721cb2c 100755 --- a/lustre/tests/sanity-hsm.sh +++ b/lustre/tests/sanity-hsm.sh @@ -484,6 +484,13 @@ cdt_clear_mount_state() { cdt_set_mount_state() { mdts_set_param "-P" hsm_control "$1" + # set_param -P is asynchronous operation and could race with set_param. + # In such case configs could be retrieved and applied at mgc after + # set_param -P completion. Sleep here to avoid race with set_param. + # We need at least 20 seconds. 10 for mgc_requeue_thread to wake up + # MGC_TIMEOUT_MIN_SECONDS + MGC_TIMEOUT_RAND_CENTISEC(5 + 5) + # and 10 seconds to retrieve config from server. + sleep 20 } cdt_check_state() {