Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(497)

Issue 6295067: cmd/jujud: add retry strategy (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by dave
Modified:
12 years, 5 months ago
Reviewers:
mp+109750
Visibility:
Public.

Description

cmd/jujud: add retry strategy Adding a simple 10 second delay between retry attempts. https://code.launchpad.net/~dave-cheney/juju-core/go-cmd-jujud-provisioning-retry/+merge/109750 Requires: https://code.launchpad.net/~dave-cheney/juju-core/go-juju-short-attempt/+merge/109744 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : cmd/jujud: add retry strategy #

Total comments: 2

Patch Set 3 : cmd/jujud: add retry strategy #

Patch Set 4 : cmd/jujud: add retry strategy #

Patch Set 5 : cmd/jujud: add retry strategy #

Patch Set 6 : cmd/jujud: add retry strategy #

Total comments: 14

Patch Set 7 : cmd/jujud: add retry strategy #

Total comments: 1

Patch Set 8 : cmd/jujud: add retry strategy #

Patch Set 9 : cmd/jujud: add retry strategy #

Total comments: 2

Patch Set 10 : cmd/jujud: add retry strategy #

Total comments: 5

Patch Set 11 : cmd/jujud: add retry strategy #

Patch Set 12 : cmd/jujud: add retry strategy #

Patch Set 13 : cmd/jujud: add retry strategy #

Patch Set 14 : cmd/jujud: add retry strategy #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -5 lines) Patch
A [revision details] View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/provisioning.go View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +15 lines, -5 lines 0 comments Download

Messages

Total messages: 25
dave_cheney.net
Please take a look.
12 years, 6 months ago (2012-06-11 23:26:20 UTC) #1
dave_cheney.net
On 2012/06/11 23:26:20, dfc wrote: > Please take a look. Before I can write a ...
12 years, 6 months ago (2012-06-11 23:27:23 UTC) #2
rog
https://codereview.appspot.com/6295067/diff/2001/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/2001/cmd/jujud/provisioning.go#newcode47 cmd/jujud/provisioning.go:47: for attempt := lengthyAttempt.Start(); attempt.Next(); { i'm not convinced ...
12 years, 6 months ago (2012-06-12 09:38:51 UTC) #3
dave_cheney.net
This was an exercise in reusing the ec2 retry code. It's not a perfect fit, ...
12 years, 6 months ago (2012-06-12 09:42:56 UTC) #4
dave_cheney.net
Please take a look. https://codereview.appspot.com/6295067/diff/2001/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/2001/cmd/jujud/provisioning.go#newcode47 cmd/jujud/provisioning.go:47: for attempt := lengthyAttempt.Start(); attempt.Next(); ...
12 years, 6 months ago (2012-06-12 22:58:56 UTC) #5
niemeyer
This CL is dirty (includes unrelated changes). The likely cause of that is a bug ...
12 years, 6 months ago (2012-06-13 01:47:12 UTC) #6
dave_cheney.net
Please take a look.
12 years, 6 months ago (2012-06-13 02:52:47 UTC) #7
dave_cheney.net
On 2012/06/13 02:52:47, dfc wrote: > Please take a look. Taking into consideration, comment #2, ...
12 years, 6 months ago (2012-06-13 02:53:18 UTC) #8
niemeyer
The logic is looking nice. A few details to polish: https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go#newcode46 ...
12 years, 6 months ago (2012-06-13 20:01:16 UTC) #9
dave_cheney.net
Please take a look. https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go#newcode46 cmd/jujud/provisioning.go:46: var err error On 2012/06/13 ...
12 years, 6 months ago (2012-06-13 23:59:19 UTC) #10
niemeyer
https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/3020/cmd/jujud/provisioning.go#newcode47 cmd/jujud/provisioning.go:47: for attempt := lengthyAttempt.Start(); attempt.Next(); { On 2012/06/13 23:59:19, ...
12 years, 6 months ago (2012-06-15 01:03:56 UTC) #11
dave_cheney.net
> The Provisioner has a Stop method, that is part of the API of this ...
12 years, 6 months ago (2012-06-15 01:06:05 UTC) #12
dave_cheney.net
Please take a look.
12 years, 6 months ago (2012-06-15 01:38:16 UTC) #13
dave_cheney.net
On 2012/06/15 01:38:16, dfc wrote: > Please take a look. *le sigh* hang on, branch ...
12 years, 6 months ago (2012-06-15 01:38:50 UTC) #14
dave_cheney.net
Please take a look.
12 years, 6 months ago (2012-06-15 01:42:12 UTC) #15
rog
On 2012/06/15 01:42:12, dfc wrote: > Please take a look. LGTM but... no test?
12 years, 6 months ago (2012-06-15 06:02:20 UTC) #16
dave_cheney.net
Can't test til the stop/start support lands. Would you like me to hold this branch ...
12 years, 6 months ago (2012-06-15 06:04:12 UTC) #17
rog
no, i'm fine for it to go in now. we'll remember it, i'm sure. On ...
12 years, 6 months ago (2012-06-15 06:11:30 UTC) #18
niemeyer
https://codereview.appspot.com/6295067/diff/9008/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/9008/cmd/jujud/provisioning.go#newcode46 cmd/jujud/provisioning.go:46: log.Printf("restarting provisioner after error: %v", err) Dave, this is ...
12 years, 6 months ago (2012-06-15 21:33:13 UTC) #19
dave_cheney.net
Please take a look. https://codereview.appspot.com/6295067/diff/9008/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/9008/cmd/jujud/provisioning.go#newcode46 cmd/jujud/provisioning.go:46: log.Printf("restarting provisioner after error: %v", ...
12 years, 6 months ago (2012-06-19 05:29:01 UTC) #20
niemeyer
I suspect it looks good, but can you please push it again since the diff ...
12 years, 6 months ago (2012-06-19 10:34:08 UTC) #21
dave_cheney.net
Sorry, I didn't realise this one had a prereq. Should be fixed now. https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go File ...
12 years, 6 months ago (2012-06-19 10:47:54 UTC) #22
dave_cheney.net
Please take a look. https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go#newcode46 cmd/jujud/provisioning.go:46: } On 2012/06/19 10:47:55, dfc ...
12 years, 6 months ago (2012-06-19 10:55:10 UTC) #23
niemeyer
LGTM, thanks, and sorry for the trouble on this one. https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go File cmd/jujud/provisioning.go (right): https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go#newcode46 ...
12 years, 6 months ago (2012-06-20 19:54:28 UTC) #24
dave_cheney.net
12 years, 6 months ago (2012-06-21 05:49:13 UTC) #25
*** Submitted:

cmd/jujud: add retry strategy

Adding a simple 10 second delay between retry attempts.

R=rog, niemeyer
CC=
https://codereview.appspot.com/6295067

https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go
File cmd/jujud/provisioning.go (right):

https://codereview.appspot.com/6295067/diff/4003/cmd/jujud/provisioning.go#ne...
cmd/jujud/provisioning.go:46: }
> Something like p.CleanlyStopped() maybe?
> 
> For clarity, we'll need to implement proper dying because we'll need to watch
> notifications of upgrades and exit so that a new version can come up, for
> example.

Done. For the moment nil is interpreted as a signal to exit the retry loop.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b