Merge lp:~abentley/juju-ci-tools/hammer-time-timeout into lp:juju-ci-tools

Proposed by Aaron Bentley
Status: Merged
Merged at revision: 1975
Proposed branch: lp:~abentley/juju-ci-tools/hammer-time-timeout
Merge into: lp:juju-ci-tools
Diff against target: 28 lines (+4/-1)
1 file modified
hammer-time-job.bash (+4/-1)
To merge this branch: bzr merge lp:~abentley/juju-ci-tools/hammer-time-timeout
Reviewer Review Type Date Requested Status
Curtis Hovey (community) code Approve
Review via email: mp+321879@code.launchpad.net

Commit message

Allow hammer-time timeout to be configured.

Description of the change

This branch adds an optional TIMEOUT for hammer-time.

Looking at the recent AWS failures of hammer-time, they are timing out at 30 minutes. I think we need to increase the timeout. But there's no way to increase the timeout used by hammer-time-job.

hammer-time-job allows the number of actions to be controlled. The more actions, the longer the duration. But it doesn't allow the maximum duration to be controlled, so it can't adapt as the number of actions is configured.

I therefore think it makes sense to add a TIMEOUT.

To post a comment you must log in.
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is fine for now. Maybe we want a base timeout (possibly by substrate) that is multiplied by the number of actions. I have pondered something similar for bundles in azure and gce.

review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hammer-time-job.bash'
2--- hammer-time-job.bash 2017-04-03 19:25:50 +0000
3+++ hammer-time-job.bash 2017-04-04 15:42:21 +0000
4@@ -12,12 +12,15 @@
5 #
6 # Optional:
7 # replay_build_number The number of a previous build to replay.
8+# TIMEOUT The timeout for the operation. Should be a value acceptable to
9+# /usr/bin/timeout, e.g. 35m for 35 minutes. Default: 30m
10 set -eu
11 export ARTIFACTS=$WORKSPACE/artifacts
12 export MODEL_NAME=$JOB_NAME
13 export DATA_DIR=$JUJU_HOME/jes-homes/$MODEL_NAME
14 export PLAN=$ARTIFACTS/plan.yaml
15 export HAMMER_DIR=$(dirname $(dirname $HAMMER_TIME))
16+: ${TIMEOUT=30m}
17 set -x
18 s3ci.py get-summary $revision_build $base_config
19 jujuci.py -v setup-workspace $WORKSPACE
20@@ -28,7 +31,7 @@
21 fi
22 export JUJU_BIN=$(s3ci.py get-juju-bin $revision_build $WORKSPACE)
23 set +e
24-timeout 30m bash <<"EOT"
25+timeout $TIMEOUT bash <<"EOT"
26 set -eux
27 deploy_job.py $base_config $JUJU_BIN $ARTIFACTS $MODEL_NAME \
28 --series $series --agent-stream=revision-build-$revision_build \

Subscribers

People subscribed via source and target branches