lxc/lxc — pull request #92 by majek (2013-11-13 15:11:53+00:00)
Title: Add options to `lxc-start` to inherit network, ipc and uts namespaces

Right now `lxc-start` always does one of two things: it creates a new namespace or inherits it from the parent environment. This pull request adds a third option: share a namespace with another container (or a process).

In some situations this is handy. For example by sharing a network namespace it is possible to migrate services between containers without (or with little) downtime. Sharing `ipc` namespace allows containers to communicate using ipc. Sharing `uts` namespace is useless, but could have been easily added for consistency.

This patch creates an infrastructure for inheriting any type of namespace, but only the network namespace , ipc and uts are supported for now.

Sharing `mnt` namespace makes little sense, `pid` won't work in practice as init process usually needs to have a pid = 1, and `user` namespace is not working for reasons I don't understand.