From 14d57d158fcdfa6a9cc98aef1e4a44cc65a308d8 Mon Sep 17 00:00:00 2001 From: Valeriy Ponomaryov Date: Thu, 26 Nov 2015 13:56:16 +0200 Subject: [PATCH] Add sleep to CI hooks to avoid races Manila CI hooks for DHSS=False job with the Generic driver wait for service instance availability and right after it becomes available returns control to caller. And caller can run tests with creation of shares immediately. But, in this case, we can face race conditions when manila-share service requires some time to inform manila-scheduler. So, add 'sleep 10' operation to be executed after reaching 'available' state by service instance.It should be enough to overcome races. Change-Id: Ie4ae231701edaab319c9012e476d1f63e3806499 --- contrib/ci/common.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/ci/common.sh b/contrib/ci/common.sh index e35bcb195d..da3bf46b94 100755 --- a/contrib/ci/common.sh +++ b/contrib/ci/common.sh @@ -69,4 +69,8 @@ function manila_wait_for_drivers_init { # First argument is expected to be file path to Manila config manila_wait_for_generic_driver_init $1 + + # Sleep to make manila-share service notify manila-scheduler about + # its capabilities on time. + sleep 10 }