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

Issue 73300043: Set lxc autostart after creation.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by thumper
Modified:
10 years, 1 month ago
Reviewers:
axw, waigani, mp+210099
Visibility:
Public.

Description

Set lxc autostart after creation. Currently for a recent LXC version, the autostart is controlled by a setting in the lxc config. We were setting this in the config file that we use for creation. However this is not clone friendly, as we do not specify a config file for clone. However it is perfectly valid to modify the config for the container once it has been created. This then becomes common for both normally created containers and those that have been cloned. A key here is that our template container that we want to use as a base to clone off we do not want auto-starting, however the containers that we clone off that may well want to auto-start (in fact all will until we add the autostart policy for local). https://code.launchpad.net/~thumper/juju-core/autostart-containers-after-creation/+merge/210099 Requires: https://code.launchpad.net/~thumper/juju-core/fast-lxc/+merge/209801 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 5

Patch Set 2 : Set lxc autostart after creation. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -45 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M container/lxc/export_test.go View 1 chunk +4 lines, -3 lines 0 comments Download
M container/lxc/lxc.go View 1 6 chunks +57 lines, -30 lines 0 comments Download
M container/lxc/lxc_test.go View 1 1 chunk +8 lines, -6 lines 0 comments Download
M container/lxc/mock/mock-lxc.go View 1 3 chunks +17 lines, -5 lines 0 comments Download
M container/lxc/testing/test.go View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5
thumper
Please take a look.
10 years, 1 month ago (2014-03-09 21:29:35 UTC) #1
waigani
On 2014/03/09 21:29:35, thumper wrote: > Please take a look. LGTM
10 years, 1 month ago (2014-03-10 23:58:26 UTC) #2
axw
https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go File container/lxc/lxc_test.go (right): https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go#newcode179 container/lxc/lxc_test.go:179: name := string(instance.Id()) It's not clear why this has ...
10 years, 1 month ago (2014-03-11 02:24:13 UTC) #3
thumper
Please take a look. https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go File container/lxc/lxc_test.go (right): https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go#newcode179 container/lxc/lxc_test.go:179: name := string(instance.Id()) On 2014/03/11 ...
10 years, 1 month ago (2014-03-11 03:46:16 UTC) #4
axw
10 years, 1 month ago (2014-03-11 03:59:46 UTC) #5
On 2014/03/11 03:46:16, thumper wrote:
> Please take a look.
> 
> https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go
> File container/lxc/lxc_test.go (right):
> 
>
https://codereview.appspot.com/73300043/diff/1/container/lxc/lxc_test.go#newc...
> container/lxc/lxc_test.go:179: name := string(instance.Id())
> On 2014/03/11 02:24:13, axw wrote:
> > It's not clear why this has changed. Has something caused the contents of
the
> > file to be different (apart from the lxc.start.auto)? I would think it's
> > preferable to match exactly if it's not too onerous.
> 
> Doing an exact match now.
> 
> In order to make the match easily, I have also added in the part where the
> mounting of the log dir is done after create.
> 
> https://codereview.appspot.com/73300043/diff/1/container/lxc/mock/mock-lxc.go
> File container/lxc/mock/mock-lxc.go (right):
> 
>
https://codereview.appspot.com/73300043/diff/1/container/lxc/mock/mock-lxc.go...
> container/lxc/mock/mock-lxc.go:87: data, err := ioutil.ReadFile(configFile)
> On 2014/03/11 02:24:13, axw wrote:
> > There's utils.CopyFile, if you didn't know.
> 
> No I didn't. Using it now.

LGTM, thanks
Sign in to reply to this message.

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