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

Issue 6190061: Add upstart package with Service and Conf types

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 11 months ago by fwereade
Modified:
11 years, 11 months ago
Reviewers:
mp+105242
Visibility:
Public.

Description

Add upstart package with Service and Conf types Service enables control of, and visibility into, the state of an upstart service; Conf embeds a Service and additionally allows for installation (both directly, as used by a machine agent creating a unit agent service, and as a set of commands to run later, as used when constructing a cloud-init file to run a machine and/or provisioning agent on a new instance). https://code.launchpad.net/~fwereade/juju/go-upstart/+merge/105242 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 24

Patch Set 2 : Add upstart package with Service and Conf types #

Total comments: 18

Patch Set 3 : Add upstart package with Service and Conf types #

Total comments: 10

Patch Set 4 : Add upstart package with Service and Conf types #

Total comments: 8

Patch Set 5 : Add upstart package with Service and Conf types #

Unified diffs Side-by-side diffs Delta from patch set Stats (+372 lines, -0 lines) Patch
A [revision details] View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A upstart/upstart.go View 1 2 3 4 1 chunk +159 lines, -0 lines 0 comments Download
A upstart/upstart_test.go View 1 1 chunk +211 lines, -0 lines 0 comments Download

Messages

Total messages: 15
fwereade
Please take a look.
11 years, 11 months ago (2012-05-09 17:36:24 UTC) #1
niemeyer
https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go#newcode17 upstart/upstart.go:17: var startedRE = regexp.MustCompile("^.* start/running, process (\\d+)\n$") Really? There's ...
11 years, 11 months ago (2012-05-17 20:09:14 UTC) #2
fwereade
Thanks, nice review. A couple of questions... https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go#newcode17 upstart/upstart.go:17: var startedRE ...
11 years, 11 months ago (2012-05-21 10:04:18 UTC) #3
rog
superficial comments (i'm not familiar with upstart) https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go#newcode41 upstart/upstart.go:41: match := ...
11 years, 11 months ago (2012-05-21 11:07:38 UTC) #4
fwereade
Please take a look. https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/1/upstart/upstart.go#newcode30 upstart/upstart.go:30: func (s *Service) path() string ...
11 years, 11 months ago (2012-05-28 14:33:10 UTC) #5
rog
LGTM https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go#newcode82 upstart/upstart.go:82: {{range $k, $v := .Env}}{{printf "env %s=%q\n" $k ...
11 years, 11 months ago (2012-05-28 15:43:14 UTC) #6
dave_cheney.net
https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go#newcode41 upstart/upstart.go:41: cmd := exec.Command("status", s.Name) what about "/sbin/status", so we ...
11 years, 11 months ago (2012-05-28 22:37:46 UTC) #7
rog
couple more trivial things. https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go#newcode15 upstart/upstart.go:15: var startedRE = regexp.MustCompile("^.* start/running, ...
11 years, 11 months ago (2012-05-29 07:51:01 UTC) #8
fwereade
Please take a look. https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go#newcode15 upstart/upstart.go:15: var startedRE = regexp.MustCompile("^.* start/running, ...
11 years, 11 months ago (2012-05-29 09:58:31 UTC) #9
dave_cheney.net
LGTM. https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7001/upstart/upstart.go#newcode41 upstart/upstart.go:41: cmd := exec.Command("status", s.Name) Apart from putting all ...
11 years, 11 months ago (2012-05-29 10:01:50 UTC) #10
rog
a few more thoughts after thinking about using this. https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go#newcode20 upstart/upstart.go:20: ...
11 years, 11 months ago (2012-05-29 16:49:52 UTC) #11
fwereade
Please take a look. https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go#newcode20 upstart/upstart.go:20: InitDir string // defaults to ...
11 years, 11 months ago (2012-05-30 11:22:11 UTC) #12
rog
https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/7002/upstart/upstart.go#newcode94 upstart/upstart.go:94: Cmd string On 2012/05/30 11:22:11, fwereade wrote: > On ...
11 years, 11 months ago (2012-05-30 11:41:32 UTC) #13
niemeyer
LGTM https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go File upstart/upstart.go (right): https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go#newcode32 upstart/upstart.go:32: // Installed returns true if the the service ...
11 years, 11 months ago (2012-05-30 20:55:17 UTC) #14
fwereade
11 years, 11 months ago (2012-05-31 08:20:56 UTC) #15
*** Submitted:

Add upstart package with Service and Conf types

Service enables control of, and visibility into, the state of an upstart
service; Conf embeds a Service and additionally allows for installation
(both directly, as used by a machine agent creating a unit agent service,
and as a set of commands to run later, as used when constructing a
cloud-init file to run a machine and/or provisioning agent on a new
instance).

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

https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go
File upstart/upstart.go (right):

https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go#newcode32
upstart/upstart.go:32: // Installed returns true if the the service
configuration exists in the
On 2012/05/30 20:55:18, niemeyer wrote:
> s/the the/the/, but as you're fixing this, would you mind to use the more
common
> convention (it was my mistake to suggest otherwise):
> 
> // Installed returns whether the service .... 

Done.

https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go#newcode92
upstart/upstart.go:92: // Desc is the upstart job's "description".
On 2012/05/30 20:55:18, niemeyer wrote:
> On 2012/05/30 11:41:32, rog wrote:
> > s/"description"/description/
> 
> +1, and s/job/service/ too.
> 
> Or, alternatively, expand the abbreviation and document the fact that Conf is
> the upstart service configuration. The field name would be enough of a hint in
> this context.
> 
> Works either way for me, though.

Done.

https://codereview.appspot.com/6190061/diff/14002/upstart/upstart.go#newcode94
upstart/upstart.go:94: // Env holds the environment variables that will be set
when the job runs.
On 2012/05/30 11:41:32, rog wrote:
> s/job/command/ ?
> (to make it clear that the command will have access to those vars, assuming it
> does)

Done.
Sign in to reply to this message.

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