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

Issue 10986044: cmd/jujud/machineagent: install LXC on start

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by jameinel
Modified:
10 years, 10 months ago
Reviewers:
dimitern, fwereade, mp+174207
Visibility:
Public.

Description

cmd/jujud/machineagent: install LXC on start Related to bug #1199913. On startup we will 'apt-get install lxc' if we need to. This uses the containers/lxc code to detect if we have lxc available, and if it fails then we request to install it. I've tested this live, and it does solve the immediate problem. Also, the test suite still passes because all the things that call MachineAgent.Run are already using the lxc.TestSuite and so the containers code "provides" lxc via the MockFactory. One test we could do is that we try to install lxc if we run the machine agent (and inject a MockFactory that fails the List request). But I felt live testing was appropriate for this. https://code.launchpad.net/~jameinel/juju-core/api-connect-upgrade-1199915/+merge/174207 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3

Patch Set 2 : cmd/jujud/machineagent: install LXC on start #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+170 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/jujud/machine.go View 1 1 chunk +4 lines, -0 lines 0 comments Download
A cmd/jujud/upgradevalidation.go View 1 1 chunk +72 lines, -0 lines 1 comment Download
A utils/apt.go View 1 chunk +48 lines, -0 lines 1 comment Download
A utils/apt_test.go View 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 6
jameinel
Please take a look.
10 years, 10 months ago (2013-07-11 13:53:33 UTC) #1
fwereade
https://codereview.appspot.com/10986044/diff/1/cmd/jujud/machine.go File cmd/jujud/machine.go (right): https://codereview.appspot.com/10986044/diff/1/cmd/jujud/machine.go#newcode82 cmd/jujud/machine.go:82: log.Errorf("we were unable to install the lxc package, unable ...
10 years, 10 months ago (2013-07-11 14:03:11 UTC) #2
dimitern
LGTM https://codereview.appspot.com/10986044/diff/1/cmd/jujud/machine.go File cmd/jujud/machine.go (right): https://codereview.appspot.com/10986044/diff/1/cmd/jujud/machine.go#newcode82 cmd/jujud/machine.go:82: log.Errorf("we were unable to install the lxc package, ...
10 years, 10 months ago (2013-07-11 14:08:29 UTC) #3
jameinel
Please take a look.
10 years, 10 months ago (2013-07-11 14:58:57 UTC) #4
fwereade
LGTM with verbose warnings; I would *really* appreciate a followup that somehow tested this situation ...
10 years, 10 months ago (2013-07-11 15:08:23 UTC) #5
dimitern
10 years, 10 months ago (2013-07-11 15:09:43 UTC) #6
LGTM, just remove a TODO about locks.

https://codereview.appspot.com/10986044/diff/5002/utils/apt.go
File utils/apt.go (right):

https://codereview.appspot.com/10986044/diff/5002/utils/apt.go#newcode17
utils/apt.go:17: // TODO: When we have a unit-level lock to avoid multiple unit
agents running
delete this now?
Sign in to reply to this message.

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