ContainersSpec

Revision 1 as of 2009-11-26 21:08:00

Clear message

Summary

Release Note

This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.

Rationale

This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified.

User stories

Assumptions

Design

You can have subsections that better describe specific parts of the issue.

Implementation

This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like:

UI Changes

Should cover changes required to the UI, or specific UI that is required to implement this

Code Changes

Code changes should include an overview of what needs to change, and in some cases even the specific details.

Migration

Include:

  • data migration, if any
  • redirects from old URLs to new ones, if any
  • how users will be pointed to the new way of doing things, if necessary.

Test/Demo Plan

It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

While regular virtualization (kvm/virtualbox/vmware/...) is great, it still has to virtualize a whole computer including the BIOS and run its own kernel.

In most cases, it's not necessary and having some kind of "chroot" with quota on main resources (CPU, memory, network, disk) would be enough. That's what contextualization technologies let you do, the most known of which is probably OpenVZ (virtuoso) but Vserver and LXC also exist.

LXC is the mainline implementation of contextualization and is built-in the kernel since 2.6.28 and well working as of 2.6.31. It would be interesting that the next LTS (10.04) supports both virtualization and contextualization and so will cover everybody's needs.

Notes

  • stefan's ubuntu desktop is running in an LXC container
  • no graphics hardware available in LXC, uses NX for desktop access
  • Typical usage is dozens/hundreds of containers on one server. Each service (apache, postfix, etc) is isolated into its own container. Each container has root access, but no device access, so it's relatively secure.
  • File access is from a directory on the host. You can mount a loopback, etc.
  • Host can see all processes in ps; guests can only see their own
    • e.g. host sees 2 init processes, guest sees only 1 (and thinks it's process 1)
  • /dev is relatively bare
    • e.g. there's loop0, shm, urandom, zero, etc, but not the rest of the real hardware devices
    • It is however possible to give access to some devices by mknod and granting access to the container. For example, an asterisk server could access a telephony card.
  • Upstream KVM is looking at launching KVM's in containers
    • namespace
    • security
    • resource constraints

Use Cases for Containers

  • ltsp
  • canonical buildd's currently use chroots
  • some of canonical xen guests could be containers
  • ISP's are well suited to containers
  • Eucalyptus interacts with the hypervisor entirely through libvirt
    • could potentially have container machine types
    • need to investigate dynamic block attach
      • seems that this should be easy to do, actually
    • block device names would need to match ec2 semantics
  • KVM + LXC on same host
    • LXC inside a KVM guest
  • Package installation/upgrade testing
    • for i in contexts;do (in context) apt-get upgrade;done
  • 64bit ubuntu install with a 32bit ubuntu container

ACTIONS

  • Bug: #480739
    • Kernel config options that need to be turned on CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y
    • Need to talk to the kernel team to do this
    • Might introduce some overhead to baremetal server kernels
      • can be disabled by boot option "noswapaccount" and there will be no overhead.
  • vm-builder would need to be able to bootstrap a container (soren)
    • soren "accidentally" implemented this last week
  • libvirt needs to build against libcapng
    • need to sync libcapng from Debian
  • Could port userspace lxc to main
  • enhance libvirt apparmor for lxc coverage (jdstrand)


CategorySpec