Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-21 Thread Ian Kent
On Wed, 2019-02-20 at 14:26 +0100, Christian Brauner wrote: > On Wed, Feb 20, 2019 at 10:46:24AM +0800, Ian Kent wrote: > > On Fri, 2019-02-15 at 16:07 +, David Howells wrote: > > > Implement a kernel container object such that it contains the following > > > things: > > > > > > (1) Namespace

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-20 Thread Trond Myklebust
On Tue, 2019-02-19 at 23:03 +, David Howells wrote: > Trond Myklebust wrote: > > > Do we really need a new system call to set up containers? That > > would > > force changes to all existing orchestration software. > > No, it wouldn't. Nothing in my patches forces existing orchestration > so

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-20 Thread Christian Brauner
On Wed, Feb 20, 2019 at 10:46:24AM +0800, Ian Kent wrote: > On Fri, 2019-02-15 at 16:07 +, David Howells wrote: > > Implement a kernel container object such that it contains the following > > things: > > > > (1) Namespaces. > > > > (2) A root directory. > > > > (3) A set of processes, inc

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Paul Moore
On Tue, Feb 19, 2019 at 10:46 PM James Bottomley wrote: > On Wed, 2019-02-20 at 11:04 +0800, Ian Kent wrote: > > On Tue, 2019-02-19 at 18:20 -0800, James Bottomley wrote: > > > On Tue, 2019-02-19 at 23:06 +, David Howells wrote: > > > > James Bottomley wrote: > > > > > > > > > I thought we go

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Ian Kent
On Tue, 2019-02-19 at 19:46 -0800, James Bottomley wrote: > On Wed, 2019-02-20 at 11:04 +0800, Ian Kent wrote: > > On Tue, 2019-02-19 at 18:20 -0800, James Bottomley wrote: > > > On Tue, 2019-02-19 at 23:06 +, David Howells wrote: > > > > James Bottomley wrote: > > > > > > > > > I thought we

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread James Bottomley
On Wed, 2019-02-20 at 11:04 +0800, Ian Kent wrote: > On Tue, 2019-02-19 at 18:20 -0800, James Bottomley wrote: > > On Tue, 2019-02-19 at 23:06 +, David Howells wrote: > > > James Bottomley wrote: > > > > > > > I thought we got agreement years ago that containers don't > > > > exist in Linux a

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Ian Kent
On Tue, 2019-02-19 at 18:20 -0800, James Bottomley wrote: > On Tue, 2019-02-19 at 23:06 +, David Howells wrote: > > James Bottomley wrote: > > > > > I thought we got agreement years ago that containers don't exist in > > > Linux as a single entity: they're currently a collection of cgroups >

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Ian Kent
On Fri, 2019-02-15 at 16:07 +, David Howells wrote: > Implement a kernel container object such that it contains the following > things: > > (1) Namespaces. > > (2) A root directory. > > (3) A set of processes, including one designated as the 'init' process. Yeah, I think a name other tha

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread James Bottomley
On Tue, 2019-02-19 at 23:06 +, David Howells wrote: > James Bottomley wrote: > > > I thought we got agreement years ago that containers don't exist in > > Linux as a single entity: they're currently a collection of cgroups > > and namespaces some of which may and some of which may not be loca

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Tycho Andersen
On Fri, Feb 15, 2019 at 04:07:33PM +, David Howells wrote: > == > FUTURE DEVELOPMENT > == > > (1) Setting up the container. > > A container would be created with, say: > > int cfd = container_create("fred", CONTAINER_NEW_EMPTY_FS_NS); > ... >

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread David Howells
Eric W. Biederman wrote: > > + c->id = atomic64_inc_return(&container_id_counter); > > This id is not in a namespace, and it doesn't have enough bits > of entropy to be globally unique. Not that 64bit is enough > to have a chance at being globablly unique. It's in a container, so it doesn't

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread David Howells
James Bottomley wrote: > I thought we got agreement years ago that containers don't exist in > Linux as a single entity: they're currently a collection of cgroups and > namespaces some of which may and some of which may not be local to the > entity the orchestration system thinks of as a "contain

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread David Howells
Trond Myklebust wrote: > Do we really need a new system call to set up containers? That would > force changes to all existing orchestration software. No, it wouldn't. Nothing in my patches forces existing orchestration software to change, unless it wants to use the new facilities - then it woul

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-19 Thread Eric W. Biederman
David Howells writes: The container id details are ludicrous and will break practically every use case. This completely unacceptable. Nacked-by: "Eric W. Biederman" > diff --git a/include/linux/container.h b/include/linux/container.h > new file mode 100644 > index ..0a8918435097 >

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-17 Thread James Bottomley
Added containers and cgroups list, which somehow got lost since they might have a slight interest in a complete rewrite of the container API. On Fri, 2019-02-15 at 16:07 +, David Howells wrote: > Implement a kernel container object such that it contains the > following things: > > (1) Namesp

Re: [RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-17 Thread Trond Myklebust
Hi David, On Fri, 2019-02-15 at 16:07 +, David Howells wrote: > Implement a kernel container object such that it contains the > following > things: > > (1) Namespaces. > > (2) A root directory. > > (3) A set of processes, including one designated as the 'init' > process. > > A container

[RFC PATCH 02/27] containers: Implement containers as kernel objects

2019-02-15 Thread David Howells
Implement a kernel container object such that it contains the following things: (1) Namespaces. (2) A root directory. (3) A set of processes, including one designated as the 'init' process. A container is created and attached to a file descriptor by: int cfd = container_create(const