From 73bca6c1f4923cdf673fa11486aec04ec3576051 Mon Sep 17 00:00:00 2001 From: Sergey Cheremencev Date: Sun, 16 Nov 2014 16:01:35 +0400 Subject: [PATCH] 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 --- lustre/tests/sanity-hsm.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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() { -- 1.8.3.1