Re: [lxc-devel] Detecting if you are running in a container

2011-11-02 Thread Eric W. Biederman
Michael Tokarev writes: > [Replying to an oldish email...] > > On 12.10.2011 20:59, Kay Sievers wrote: >> On Mon, Oct 10, 2011 at 23:41, Lennart Poettering >> wrote: >>> On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: >> - udev. All of the kernel interfaces for u

Re: [lxc-devel] Detecting if you are running in a container

2011-11-02 Thread Michael Tokarev
On 02.11.2011 03:51, Eric W. Biederman wrote: [] >> And having CAP_MKNOD in container may not be that bad either, while >> cgroup device.permission is set correctly - some nodes may need to >> be created still, even in an unprivileged containers. Who filters >> out CAP_MKNOD during container start

Re: [lxc-devel] Detecting if you are running in a container

2011-11-02 Thread Michael Tokarev
[Replying to an oldish email...] On 12.10.2011 20:59, Kay Sievers wrote: > On Mon, Oct 10, 2011 at 23:41, Lennart Poettering > wrote: >> On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: > >>> - udev. All of the kernel interfaces for udev should be supported in >>> cur

Re: [lxc-devel] Detecting if you are running in a container

2011-10-14 Thread Eric W. Biederman
Ted Ts'o writes: >> I am of course making it sound a million times easier than it's >> actually likely to be, but I do think it's possible without too many >> odd corner cases. > > It's not the corner cases, it's all of the different name spaces that > different system administrators and their si

Re: [lxc-devel] Detecting if you are running in a container

2011-10-14 Thread H. Peter Anvin
On 10/14/2011 11:04 AM, Eric W. Biederman wrote: > > I have found and merged a solution that allows us to name namespaces > without needing a namespaces for namespaces. > Something based on UUIDs, perhaps? UUIDs are kind of exactly this, after all... a single namespace designed to be large and

Re: [lxc-devel] Detecting if you are running in a container

2011-10-14 Thread Ted Ts'o
On Wed, Oct 12, 2011 at 03:12:34PM -0400, Kyle Moffett wrote: > Well, you're going to need to introduce a bunch of new xattrs to > handle the namespacing anyways. > > As I understand it you can use RichACLs to grant all the same > privileges as owner and group, so you can simply map the real > nam

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread J. Bruce Fields
On Wed, Oct 12, 2011 at 02:25:04PM -0400, Kyle Moffett wrote: > On Wed, Oct 12, 2011 at 13:57, J. Bruce Fields wrote: > > On Tue, Oct 11, 2011 at 02:16:24PM -0700, Eric W. Biederman wrote: > >> Where all of this winds up interesting in the field of oncoming kernel > >> work is that uids are persis

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread Kyle Moffett
On Wed, Oct 12, 2011 at 15:04, J. Bruce Fields wrote: > On Wed, Oct 12, 2011 at 02:25:04PM -0400, Kyle Moffett wrote: >> On Wed, Oct 12, 2011 at 13:57, J. Bruce Fields wrote: >> > On Tue, Oct 11, 2011 at 02:16:24PM -0700, Eric W. Biederman wrote: >> >> Where all of this winds up interesting in th

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread Kyle Moffett
On Wed, Oct 12, 2011 at 13:57, J. Bruce Fields wrote: > On Tue, Oct 11, 2011 at 02:16:24PM -0700, Eric W. Biederman wrote: >> Where all of this winds up interesting in the field of oncoming kernel >> work is that uids are persistent and are stored in file systems.  So >> once we have all of the pe

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread J. Bruce Fields
On Tue, Oct 11, 2011 at 02:16:24PM -0700, Eric W. Biederman wrote: > It actually isn't much complexity and for the most part the code that > I care about in that area is already merged. In principle all I care > about are having the identiy checks go from: > (uid1 == uid2) to ((user_ns1 == user_ns

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread Kay Sievers
On Mon, Oct 10, 2011 at 23:41, Lennart Poettering wrote: > On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: >> - udev.  All of the kernel interfaces for udev should be supported in >>   current kernels.  However I believe udev is useless because container >>   start drops

Re: [lxc-devel] Detecting if you are running in a container

2011-10-12 Thread Serge E. Hallyn
Quoting da...@lang.hm (da...@lang.hm): > On Tue, 11 Oct 2011, Eric W. Biederman wrote: > > >da...@lang.hm writes: > > > >>On Tue, 11 Oct 2011, Eric W. Biederman wrote: > >> > >>>Theodore Tso writes: > >>> > On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: > > >>>I admit for a lot of

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread david
On Tue, 11 Oct 2011, Eric W. Biederman wrote: > Theodore Tso writes: > >> On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: >> >>> I am totally in favor of not starting the entire world. But just >>> like I find it convienient to loopback mount an iso image to see >>> what is on a disk image

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread david
On Mon, 10 Oct 2011, Matt Helsley wrote: > On Mon, Oct 10, 2011 at 09:32:01PM -0400, Ted Ts'o wrote: >> On Mon, Oct 10, 2011 at 01:59:10PM -0700, Eric W. Biederman wrote: >>> Lennart Poettering writes: >>> To make a standard distribution run nicely in a Linux container you usually have

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Eric W. Biederman
Theodore Tso writes: > On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: > >> I am totally in favor of not starting the entire world. But just >> like I find it convienient to loopback mount an iso image to see >> what is on a disk image. It would be handy to be able to just >> download a d

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Eric W. Biederman
da...@lang.hm writes: > On Tue, 11 Oct 2011, Eric W. Biederman wrote: > >> Theodore Tso writes: >> >>> On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: >>> I am totally in favor of not starting the entire world. But just like I find it convienient to loopback mount an iso image to

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread david
On Tue, 11 Oct 2011, Eric W. Biederman wrote: > da...@lang.hm writes: > >> On Tue, 11 Oct 2011, Eric W. Biederman wrote: >> >>> Theodore Tso writes: >>> On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: >>> I admit for a lot of test cases that it makes sense not to use a full >>> se

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Theodore Tso
On Oct 11, 2011, at 2:42 AM, Eric W. Biederman wrote: > I am totally in favor of not starting the entire world. But just > like I find it convienient to loopback mount an iso image to see > what is on a disk image. It would be handy to be able to just > download a distro image and play with it,

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Eric W. Biederman
Lennart Poettering writes: > On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: > >> > Quite a few kernel subsystems are >> > currently not virtualized, for example SELinux, VTs, most of sysfs, most >> > of /proc/sys, audit, udev or file systems (by which I mean that for a >

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Ted Ts'o
On Mon, Oct 10, 2011 at 01:59:10PM -0700, Eric W. Biederman wrote: > Lennart Poettering writes: > > > To make a standard distribution run nicely in a Linux container you > > usually have to make quite a number of modifications to it and disable > > certain things from the boot process. Ideally ho

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Lennart Poettering
On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: > > Quite a few kernel subsystems are > > currently not virtualized, for example SELinux, VTs, most of sysfs, most > > of /proc/sys, audit, udev or file systems (by which I mean that for a > > container you probably don't wan

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Ted Ts'o
On Mon, Oct 10, 2011 at 07:05:30PM -0700, Matt Helsley wrote: > Yes, it does detract from the unique advantages of using a container. > However, I think the value here is not the effeciency of the initial > system configuration but the fact that it gives users a better place to > start. > > Right

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Eric W. Biederman
Ted Ts'o writes: > On Mon, Oct 10, 2011 at 07:05:30PM -0700, Matt Helsley wrote: >> Yes, it does detract from the unique advantages of using a container. >> However, I think the value here is not the effeciency of the initial >> system configuration but the fact that it gives users a better place

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Eric W. Biederman
Lennart Poettering writes: > On Mon, 10.10.11 13:59, Eric W. Biederman (ebied...@xmission.com) wrote: >> My list of things that still have work left to do looks like: >> - cgroups. It is not safe to create a new hierarchies with groups >> that are in existing hierarchies. So cgroups don't wo

Re: [lxc-devel] Detecting if you are running in a container

2011-10-11 Thread Matt Helsley
On Mon, Oct 10, 2011 at 09:32:01PM -0400, Ted Ts'o wrote: > On Mon, Oct 10, 2011 at 01:59:10PM -0700, Eric W. Biederman wrote: > > Lennart Poettering writes: > > > > > To make a standard distribution run nicely in a Linux container you > > > usually have to make quite a number of modifications to