Skip to content

Commit 8eda08d

Browse files
author
James E. Blair
committed
Use BUILD_TIMEOUT
According to https://review.openstack.org/95933 we should have an env variable called BUILD_TIMEOUT. Change-Id: Iff5e96bd80b8f165ccc7d6be09b53208613571eb
1 parent 239af44 commit 8eda08d

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

‎README.rst‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ the jenkins/jobs directory in a file named devstack-gate.yaml. It will
207207
probably look something like::
208208

209209
export PYTHONUNBUFFERED=true
210-
export DEVSTACK_GATE_TIMEOUT=120
211210
export DEVSTACK_GATE_TEMPEST=1
212211
export DEVSTACK_GATE_TEMPEST_FULL=1
213212
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh

‎devstack-vm-gate-wrap.sh‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,19 @@ export DEVSTACK_GATE_REQS_INTEGRATION=${DEVSTACK_GATE_REQS_INTEGRATION:-0}
334334
# until they get their driver cleaned up)
335335
export DEVSTACK_GATE_CLEAN_LOGS=${DEVSTACK_GATE_CLEAN_LOGS:-1}
336336

337-
# Set this to the time in minutes that the gate test should be allowed
338-
# to run before being aborted (default 60).
339-
export DEVSTACK_GATE_TIMEOUT=${DEVSTACK_GATE_TIMEOUT:-60}
337+
# Set this to the time in milliseconds that the entire job should be
338+
# allowed to run before being aborted (default 120 minutes=7200000ms).
339+
# This may be supplied by Jenkins based on the configured job timeout
340+
# which is why it's in this convenient unit.
341+
export BUILD_TIMEOUT=$(expr ${BUILD_TIMEOUT:-7200000} / 60000)
342+
343+
# Set this to the time in minutes that should be reserved for
344+
# uploading artifacts at the end after a timeout. Defaults to 5
345+
# minutes.
346+
export DEVSTACK_GATE_TIMEOUT_BUFFER=${DEVSTACK_GATE_TIMEOUT_BUFFER:-5}
347+
348+
# Not user servicable.
349+
export DEVSTACK_GATE_TIMEOUT=$(expr $BUILD_TIMEOUT - $DEVSTACK_GATE_TIMEOUT_BUFFER)
340350

341351
# Set to 1 to remove the stack users blanket sudo permissions forcing
342352
# openstack services running as the stack user to rely on rootwrap rulesets
@@ -408,6 +418,8 @@ fi
408418

409419
echo "Triggered by: https://review.openstack.org/$ZUUL_CHANGE patchset $ZUUL_PATCHSET"
410420
echo "Pipeline: $ZUUL_PIPELINE"
421+
echo "Timeout set to $DEVSTACK_GATE_TIMEOUT minutes \
422+
with $DEVSTACK_GATE_TIMEOUT_BUFFER minutes reserved for cleanup."
411423
echo "Available disk space on this host:"
412424
indent df -h
413425

0 commit comments

Comments
 (0)