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 <sergey.cheremencev@seagate.com>
Reviewed-on: http://review.whamcloud.com/12783
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
cdt_set_mount_state() {
mdts_set_param "-P" hsm_control "$1"
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