Browse code

Make screen sleep time configurable

the sleep 3 in screen_it was added to make devstack pass in the gate
with exceptionally slow test cloud nodes. In the gate we now bypass
the screen path entirely. However the sleep 3 remains and can add a
couple minutes delay into local development runs.

We're not sure yet how low this can safely be tuned, so step 1 is to
make it configurable, then get devstack team members to try various
options to see what works.

Conflicts:
functions-common

Change-Id: I0e6476176fc8589efc4e40e78c2231f704d14e45
(cherry picked from commit 4b2b14c4b94bc13035b8f6f043ee81eb58004c6e)

Sean Dague authored on 2015/04/07 23:40:49
Showing 1 changed files
... ...
@@ -1288,8 +1288,13 @@ function screen_service {
1288 1288
 
1289 1289
         # sleep to allow bash to be ready to be send the command - we are
1290 1290
         # creating a new window in screen and then sends characters, so if
1291
-        # bash isn't running by the time we send the command, nothing happens
1292
-        sleep 3
1291
+        # bash isn't running by the time we send the command, nothing
1292
+        # happens.  This sleep was added originally to handle gate runs
1293
+        # where we needed this to be at least 3 seconds to pass
1294
+        # consistently on slow clouds. Now this is configurable so that we
1295
+        # can determine a reasonable value for the local case which should
1296
+        # be much smaller.
1297
+        sleep ${SCREEN_SLEEP:-3}
1293 1298
 
1294 1299
         NL=`echo -ne '\015'`
1295 1300
         # This fun command does the following: