Merge lp://staging/~rogpeppe/juju-core/281-set-xe into lp://staging/~juju/juju-core/trunk
Proposed by
Roger Peppe
Status: | Merged |
---|---|
Approved by: | William Reade |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1157 |
Proposed branch: | lp://staging/~rogpeppe/juju-core/281-set-xe |
Merge into: | lp://staging/~juju/juju-core/trunk |
Diff against target: |
51 lines (+5/-1) 3 files modified
environs/cloudinit/cloudinit.go (+1/-0) environs/cloudinit/cloudinit_test.go (+3/-0) environs/ec2/ec2.go (+1/-1) |
To merge this branch: | bzr merge lp://staging/~rogpeppe/juju-core/281-set-xe |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+158356@code.staging.launchpad.net |
Description of the change
environs/cloudinit: fail properly in cloudinit
If one command fails, we should not carry on and
try more. We also cause the executing commands to
be printed, so it should be more obvious which command
caused the script to fail.
To post a comment you must log in.
Reviewers: mp+158356_ code.launchpad. net,
Message:
Please take a look.
Description:
environs/cloudinit: fail properly in cloudinit
If one command fails, we should not carry on and
try more. We also cause the executing commands to
be printed, so it should be more obvious which command
caused the script to fail.
We also raise the shortAttempt timeout level - I have
seen live timeouts exceeding 20s.
https:/ /code.launchpad .net/~rogpeppe/ juju-core/ 281-set- xe/+merge/ 158356
(do not edit description out of merge proposal)
Please review this at https:/ /codereview. appspot. com/8661043/
Affected files: cloudinit/ cloudinit. go cloudinit/ cloudinit_ test.go
A [revision details]
M environs/
M environs/
M environs/ec2/ec2.go
Index: [revision details]
=== added file '[revision details]'
--- [revision details] 2012-01-01 00:00:00 +0000
+++ [revision details] 2012-01-01 00:00:00 +0000
@@ -0,0 +1,2 @@
+Old revision:
<email address hidden>
+New revision: <email address hidden>
Index: environs/ cloudinit/ cloudinit. go cloudinit/ cloudinit. go' cloudinit/ cloudinit. go 2013-04-11 02:13:40 +0000 cloudinit/ cloudinit. go 2013-04-11 12:43:17 +0000 ("git")
=== modified file 'environs/
--- environs/
+++ environs/
@@ -107,6 +107,7 @@
c.AddPackage
addScripts(c, Sprintf( "mkdir -p %s", cfg.DataDir),
+ "set -xe", // ensure we run all the scripts or abort.
fmt.
"mkdir -p /var/log/juju")
Index: environs/ cloudinit/ cloudinit_ test.go cloudinit/ cloudinit_ test.go' cloudinit/ cloudinit_ test.go 2013-04-11 07:54:47 +0000 cloudinit/ cloudinit_ test.go 2013-04-11 12:44:36 +0000 /var/lib/ juju/tools/ 1\.2\.3- precise- amd64' /var/lib/ juju/tools/ 1\.2\.3- raring- amd64' /var/lib/ juju/tools/ 1\.2\.3- linux-amd64'
=== modified file 'environs/
--- environs/
+++ environs/
@@ -73,6 +73,7 @@
},
setEnvConfig: true,
expectScripts: `
+set -xe
mkdir -p /var/lib/juju
mkdir -p /var/log/juju
bin='
@@ -127,6 +128,7 @@
},
setEnvConfig: true,
expectScripts: `
+set -xe
mkdir -p /var/lib/juju
mkdir -p /var/log/juju
bin='
@@ -177,6 +179,7 @@
},
},
expectScripts: `
+set -xe
mkdir -p /var/lib/juju
mkdir -p /var/log/juju
bin='
Index: environs/ec2/ec2.go ec2/ec2. go' AttemptStrategy {
=== modified file 'environs/
--- environs/ec2/ec2.go 2013-04-11 02:13:40 +0000
+++ environs/ec2/ec2.go 2013-04-11 12:43:17 +0000
@@ -34,7 +34,7 @@
// a security group after termination). The former failure mode is
// dealt with by shortAttempt, the latter by longAttempt.
var shortAttempt = trivial.
- Total: 5 * time.Second,
+ Total: 40 * time.Second,
Delay: 200 * time.Millisecond,
}