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

Issue 32710043: Add a provisioner safe mode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by wallyworld
Modified:
10 years, 5 months ago
Reviewers:
mp+196666, fwereade, rog
Visibility:
Public.

Description

Add a provisioner safe mode A new environ setting provisioner-safe-mode is introduced (default = false). If true, then the environ provisioner will not stop instances that it does not know about. I had to muck about a little with the logic to handle dead machines to get the starts to align. See bug 1254729 https://code.launchpad.net/~wallyworld/juju-core/provisioner-safe-mode/+merge/196666 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 24

Patch Set 2 : Add a provisioner safe mode #

Total comments: 4

Patch Set 3 : Add a provisioner safe mode #

Patch Set 4 : Add a provisioner safe mode #

Patch Set 5 : Add a provisioner safe mode #

Total comments: 4

Patch Set 6 : Add a provisioner safe mode #

Patch Set 7 : Add a provisioner safe mode #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+309 lines, -40 lines) Patch
A [revision details] View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M environs/config/config.go View 1 2 3 4 5 3 chunks +16 lines, -7 lines 0 comments Download
M environs/config/config_test.go View 3 chunks +30 lines, -0 lines 0 comments Download
M worker/provisioner/provisioner.go View 1 2 3 4 5 6 7 chunks +11 lines, -9 lines 0 comments Download
M worker/provisioner/provisioner_task.go View 1 2 3 4 5 6 11 chunks +75 lines, -19 lines 11 comments Download
M worker/provisioner/provisioner_test.go View 1 2 3 4 5 6 2 chunks +175 lines, -5 lines 0 comments Download

Messages

Total messages: 16
wallyworld
Please take a look.
10 years, 5 months ago (2013-11-26 07:27:45 UTC) #1
fwereade
A few thoughts prior to a longer pass. https://codereview.appspot.com/32710043/diff/1/worker/provisioner/provisioner_task.go File worker/provisioner/provisioner_task.go (left): https://codereview.appspot.com/32710043/diff/1/worker/provisioner/provisioner_task.go#oldcode275 worker/provisioner/provisioner_task.go:275: logger.Tracef("unknown: ...
10 years, 5 months ago (2013-11-26 09:07:38 UTC) #2
rog
The basic structure looks good (in particular an environ config setting seems like a good ...
10 years, 5 months ago (2013-11-26 09:36:30 UTC) #3
fwereade
I think I'm with roger, just clearing out unknown seems cleaner. And I'd like to ...
10 years, 5 months ago (2013-11-26 09:43:00 UTC) #4
fwereade
On 2013/11/26 09:43:00, fwereade wrote: > I think I'm with roger, just clearing out unknown ...
10 years, 5 months ago (2013-11-26 09:47:36 UTC) #5
wallyworld
Please take a look. https://codereview.appspot.com/32710043/diff/1/environs/config/config.go File environs/config/config.go (right): https://codereview.appspot.com/32710043/diff/1/environs/config/config.go#newcode580 environs/config/config.go:580: "provisioner-safe-mode": false, On 2013/11/26 09:36:30, ...
10 years, 5 months ago (2013-11-26 11:47:52 UTC) #6
wallyworld
Please take a look.
10 years, 5 months ago (2013-11-26 12:22:42 UTC) #7
rog
Looks great, thanks. A few minor comments below. https://codereview.appspot.com/32710043/diff/1/environs/config/config.go File environs/config/config.go (right): https://codereview.appspot.com/32710043/diff/1/environs/config/config.go#newcode580 environs/config/config.go:580: "provisioner-safe-mode": ...
10 years, 5 months ago (2013-11-26 12:28:19 UTC) #8
wallyworld
Please take a look. https://codereview.appspot.com/32710043/diff/1/environs/config/config.go File environs/config/config.go (right): https://codereview.appspot.com/32710043/diff/1/environs/config/config.go#newcode580 environs/config/config.go:580: "provisioner-safe-mode": false, On 2013/11/26 12:28:19, ...
10 years, 5 months ago (2013-11-26 13:53:01 UTC) #9
wallyworld
Please take a look.
10 years, 5 months ago (2013-11-26 13:56:34 UTC) #10
wallyworld
Please take a look.
10 years, 5 months ago (2013-11-27 03:19:15 UTC) #11
wallyworld
Please take a look.
10 years, 5 months ago (2013-11-27 04:01:57 UTC) #12
fwereade
couple more thoughts https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provisioner_task.go File worker/provisioner/provisioner_task.go (right): https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provisioner_task.go#newcode143 worker/provisioner/provisioner_task.go:143: if err := task.processMachines(nil); err != ...
10 years, 5 months ago (2013-11-27 10:52:23 UTC) #13
wallyworld
https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provisioner_task.go File worker/provisioner/provisioner_task.go (right): https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provisioner_task.go#newcode143 worker/provisioner/provisioner_task.go:143: if err := task.processMachines(nil); err != nil { On ...
10 years, 5 months ago (2013-11-27 10:58:09 UTC) #14
rog
I'll take this forward, addressing the comments below, and others. https://codereview.appspot.com/32710043/diff/80001/environs/config/config.go File environs/config/config.go (right): https://codereview.appspot.com/32710043/diff/80001/environs/config/config.go#newcode595 ...
10 years, 5 months ago (2013-11-27 12:47:19 UTC) #15
rog
10 years, 5 months ago (2013-11-27 15:39:29 UTC) #16
Review moved to https://codereview.appspot.com/34050043/

https://codereview.appspot.com/32710043/diff/80001/worker/provisioner/provisi...
File worker/provisioner/provisioner_task.go (right):

https://codereview.appspot.com/32710043/diff/80001/worker/provisioner/provisi...
worker/provisioner/provisioner_task.go:175: }
On 2013/11/27 12:47:19, rog wrote:
> } else {
>      logger.Infof("stopping unknown instances %v", unknown)
> }
> 
> (and lose the logger call in findUnknownInstances)
> ?

Done.

https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provis...
File worker/provisioner/provisioner_task.go (right):

https://codereview.appspot.com/32710043/diff/120001/worker/provisioner/provis...
worker/provisioner/provisioner_task.go:217: func asString(instances
[]instance.Instance) string {
On 2013/11/27 12:47:19, rog wrote:
> I think I'd call this "instanceIds" and have it return []string.

Done.
Sign in to reply to this message.

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