Whamcloud - gitweb
LU-8879 tests: speed up copytool_cleanup() in sanity-hsm 25/24025/7
authorQuentin Bouget <quentin.bouget@cea.fr>
Tue, 29 Nov 2016 15:39:26 +0000 (16:39 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 5 May 2017 00:43:31 +0000 (00:43 +0000)
commita729f66cf1917b80975937568552625f1cc45271
treee2726678ae1a07e9aa2b53331db65df9f6432937
parentaa096c486589129a7bc20f9b8c31803e56c4b82f
LU-8879 tests: speed up copytool_cleanup() in sanity-hsm

This patch implements the following improvements:

 - The coordinator now wakes up when hsm_control is set to 'shutdown'

 - The wait_copytools() function in sanity-hsm uses a polling
   mechanism to detect when all running copytools are killed.
   It used to sleep before the first check, even though that check
   would pass most of the time. This has been fixed.

 - wait_copytools() used to sleep for 2s between its checks. It now
   sleeps for 0.1s, 0.2s, 0.4s, 0.8s, 1.6s, 3.2s, 3.2s, 3.2s, ...
   until it times out.

Considering how often the wait_copytools() function is called in
sanity-hsm, this patch should represent a noticeable speed-up.

Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: Quentin Bouget <quentin.bouget@cea.fr>
Change-Id: Ia460df59a724caaa194565dd7af402c8c617f40e
Reviewed-on: https://review.whamcloud.com/24025
Reviewed-by: Henri Doreau <henri.doreau@cea.fr>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jean-Baptiste Riaux <riaux.jb@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdt/mdt_coordinator.c
lustre/tests/sanity-hsm.sh