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

Issue 10235047: Add lxc to our cloud-init packages

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 10 months ago by thumper
Modified:
10 years, 10 months ago
Reviewers:
serge.hallyn, dave, mp+169328, fwereade, jameinel
Visibility:
Public.

Description

Add lxc to our cloud-init packages However don't add lxc if the machine itself is an lxc container as the install fails on precise causing the lxc container to fail to start. https://code.launchpad.net/~thumper/juju-core/lxc-cloud-init/+merge/169328 Requires: https://code.launchpad.net/~thumper/juju-core/machine-id-from-tag/+merge/169327 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : Add lxc to our cloud-init packages #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -0 lines) Patch
A [revision details] View 1 1 chunk +2 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit.go View 2 chunks +9 lines, -0 lines 0 comments Download
M environs/cloudinit/cloudinit_test.go View 1 2 chunks +42 lines, -0 lines 0 comments Download

Messages

Total messages: 6
thumper
Please take a look.
10 years, 10 months ago (2013-06-14 02:36:30 UTC) #1
fwereade
Needs a CheckPackage in a test somewhere
10 years, 10 months ago (2013-06-14 07:55:22 UTC) #2
jameinel
LGTM caveat William's request.
10 years, 10 months ago (2013-06-16 08:38:44 UTC) #3
thumper
Please take a look.
10 years, 10 months ago (2013-06-16 23:45:55 UTC) #4
dave_cheney.net
LGTM. Thanks for the test.
10 years, 10 months ago (2013-06-16 23:47:51 UTC) #5
serge.hallyn
10 years, 10 months ago (2013-06-18 14:32:21 UTC) #6
Hi,

Not installing lxc by default if you're already inside a container is
reasonable, since you may well not have been able to control the environment of
the first container.

However, if you are able to control the creation of the first container (as you
are in juju), then you can make lxc installable inside that container.  It
amounts to:

1. set lxc.aa_profile = lxc-container-default-with-nesting
2. set lxc.mount.hook = /usr/share/lxc/hooks/mountcgroups
3. the lxc package should set up a lxcbr0 which does not conflict with the
parent container's address.  The saucy package does this by default.  If it is
needed, we could try to SRU that change to precise's lxc.  Alternatively, you
could hack the lxc network configuration settings by hand (from cloud-init or
from juju install script) by either modifying /etc/default/lxc after the fact,
or creating a suitable one ahead of time so that lxc does not overwrite it on
install.

cloud-init can detect that 1 and 2 are satisified ( by looking at
/proc/1/attr/current to check the aa profile and by checking whether cgroups are
mounted).
Sign in to reply to this message.

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