cgroups.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [OFFLIST] status of devcg
       [not found] ` <20130710184655.GB16979-9pTldWuhBndy/B6EtB590w@public.gmane.org>
@ 2013-07-10 19:50   ` Aristeu Rozanski
       [not found]     ` <20130710195001.GW14011-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Aristeu Rozanski @ 2013-07-10 19:50 UTC (permalink / raw)
  To: Tejun Heo
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Kay Sievers, Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

On Wed, Jul 10, 2013 at 11:46:55AM -0700, Tejun Heo wrote:
> Just wondering whether you're working on implementing new hierarchical
> behavior on devcg.  If so, can you please share some details on how
> you're planning to do it?  Please feel free to add the relevant
> mailing lists when replying.

I did start, but still dealing with lots of company internal tasks so I
couldn't do much.

One of the ideas is to start changing (again) how the rules are processed
internally, moving away from the default policy + exceptions model to
an ordered set of rules like iptables:

	default: allow/deny
	allow block major 100-101, all minors
	deny char major 200, all minors
	...

That will solve most complex use cases the current model won't [1] but
the problem with this approach is that since it relies on order, merging
would be a problem, and it'd have test each parent all the way to / to
make sure the access is possible.

[1] One example of usage the current model won't solve:

	- by default deny everything
	- allow c,200,*
	- but deny c,200,100

The second idea, which is simpler, will reuse the current internal model
of default policy + exceptions and the idea in the initial patches of having
two lists in each cgroup: active policy+exceptions and locally set
policy+exceptions. This way for every change that happens in a parent (or
even change of parents when moving the cgroup around), the active
policy+exceptions will be regenerated.

In both cases, we do need a new userspace interface (although we can
still provide backwards compatibility with the old one).

Comments?

-- 
Aristeu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]     ` <20130710195001.GW14011-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-07-11  9:34       ` Daniel P. Berrange
       [not found]         ` <20130711093405.GC2377-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Daniel P. Berrange @ 2013-07-11  9:34 UTC (permalink / raw)
  To: Aristeu Rozanski
  Cc: Tejun Heo, Li Zefan, Lennart Poettering, Kay Sievers,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	cgroups-u79uwXL29TY76Z2rM5mHXA

On Wed, Jul 10, 2013 at 03:50:02PM -0400, Aristeu Rozanski wrote:
> On Wed, Jul 10, 2013 at 11:46:55AM -0700, Tejun Heo wrote:
> > Just wondering whether you're working on implementing new hierarchical
> > behavior on devcg.  If so, can you please share some details on how
> > you're planning to do it?  Please feel free to add the relevant
> > mailing lists when replying.
> 
> I did start, but still dealing with lots of company internal tasks so I
> couldn't do much.
> 
> One of the ideas is to start changing (again) how the rules are processed
> internally, moving away from the default policy + exceptions model to
> an ordered set of rules like iptables:
> 
> 	default: allow/deny
> 	allow block major 100-101, all minors
> 	deny char major 200, all minors
> 	...
> 
> That will solve most complex use cases the current model won't [1] but
> the problem with this approach is that since it relies on order, merging
> would be a problem, and it'd have test each parent all the way to / to
> make sure the access is possible.
> 
> [1] One example of usage the current model won't solve:
> 
> 	- by default deny everything
> 	- allow c,200,*
> 	- but deny c,200,100
> 
> The second idea, which is simpler, will reuse the current internal model
> of default policy + exceptions and the idea in the initial patches of having
> two lists in each cgroup: active policy+exceptions and locally set
> policy+exceptions. This way for every change that happens in a parent (or
> even change of parents when moving the cgroup around), the active
> policy+exceptions will be regenerated.
> 
> In both cases, we do need a new userspace interface (although we can
> still provide backwards compatibility with the old one).
> 
> Comments?

FWIW, libvirt's usage of devcg is to deny all by default, allow major 136
(for all /dev/pts/*), followed by allow (major,minor) pair for each specific
whitelisted devices. As such we don't have anything that relies on ordering
of rules in devcg.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]         ` <20130711093405.GC2377-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2013-07-11 15:51           ` Tejun Heo
       [not found]             ` <20130711155106.GB9229-9pTldWuhBndy/B6EtB590w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2013-07-11 15:51 UTC (permalink / raw)
  To: Daniel P. Berrange
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Kay Sievers, Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

On Thu, Jul 11, 2013 at 10:34:05AM +0100, Daniel P. Berrange wrote:
> FWIW, libvirt's usage of devcg is to deny all by default, allow major 136
> (for all /dev/pts/*), followed by allow (major,minor) pair for each specific
> whitelisted devices. As such we don't have anything that relies on ordering
> of rules in devcg.

I'd personally much prefer something very simple - allow all by
default, allow only the specified if explicitly specified.  I really
don't want full iptables like facility inside devcg.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]             ` <20130711155106.GB9229-9pTldWuhBndy/B6EtB590w@public.gmane.org>
@ 2013-07-11 16:05               ` Serge Hallyn
  2013-07-11 17:10                 ` Tejun Heo
  0 siblings, 1 reply; 9+ messages in thread
From: Serge Hallyn @ 2013-07-11 16:05 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Kay Sievers,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

Quoting Tejun Heo (tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org):
> On Thu, Jul 11, 2013 at 10:34:05AM +0100, Daniel P. Berrange wrote:
> > FWIW, libvirt's usage of devcg is to deny all by default, allow major 136
> > (for all /dev/pts/*), followed by allow (major,minor) pair for each specific
> > whitelisted devices. As such we don't have anything that relies on ordering
> > of rules in devcg.
> 
> I'd personally much prefer something very simple - allow all by
> default, allow only the specified if explicitly specified.  I really
> don't want full iptables like facility inside devcg.
> 
> Thanks.

FWIW lxc is also quite happy with the simple rules.

Is there something in particular you want to accomplish for which the
current rules do not suffice?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
  2013-07-11 16:05               ` Serge Hallyn
@ 2013-07-11 17:10                 ` Tejun Heo
       [not found]                   ` <20130711171037.GB10195-9pTldWuhBndy/B6EtB590w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2013-07-11 17:10 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: Kay Sievers,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

Hello,

On Thu, Jul 11, 2013 at 11:05:32AM -0500, Serge Hallyn wrote:
> Is there something in particular you want to accomplish for which the
> current rules do not suffice?

Yeah, a cgroup changing its rules affecting the descendants
irreversibly, which is nasty and makes it tricky to implement
automation on top or implement proper cgroup migration, so I asked
Aristeu whether he could implement cleaner behavior for unified
hierarchy.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]                   ` <20130711171037.GB10195-9pTldWuhBndy/B6EtB590w@public.gmane.org>
@ 2013-07-11 17:11                     ` Tejun Heo
  2013-07-11 19:12                     ` Serge Hallyn
  1 sibling, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2013-07-11 17:11 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: Daniel P. Berrange,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Kay Sievers, Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

On Thu, Jul 11, 2013 at 10:10:37AM -0700, Tejun Heo wrote:
> Hello,
> 
> On Thu, Jul 11, 2013 at 11:05:32AM -0500, Serge Hallyn wrote:
> > Is there something in particular you want to accomplish for which the
> > current rules do not suffice?
> 
> Yeah, a cgroup changing its rules affecting the descendants
> irreversibly, which is nasty and makes it tricky to implement
> automation on top or implement proper cgroup migration, so I asked
> Aristeu whether he could implement cleaner behavior for unified
> hierarchy.

Ooh, BTW, the other controller which has similar behavior is cpuset
and that one is gonna be updated too.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]                   ` <20130711171037.GB10195-9pTldWuhBndy/B6EtB590w@public.gmane.org>
  2013-07-11 17:11                     ` Tejun Heo
@ 2013-07-11 19:12                     ` Serge Hallyn
  2013-07-11 20:38                       ` Tejun Heo
  1 sibling, 1 reply; 9+ messages in thread
From: Serge Hallyn @ 2013-07-11 19:12 UTC (permalink / raw)
  To: Tejun Heo
  Cc: Daniel P. Berrange,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Kay Sievers, Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

Quoting Tejun Heo (tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org):
> Hello,
> 
> On Thu, Jul 11, 2013 at 11:05:32AM -0500, Serge Hallyn wrote:
> > Is there something in particular you want to accomplish for which the
> > current rules do not suffice?
> 
> Yeah, a cgroup changing its rules affecting the descendants
> irreversibly, which is nasty and makes it tricky to implement
> automation on top or implement proper cgroup migration, so I asked
> Aristeu whether he could implement cleaner behavior for unified
> hierarchy.

Before I respond to that, could you please tell me precisely what
you mean by 'unified hierarchy'?  I thought it just meant all
controllers composed into one mount.  Maybe it means something
else.

-serge

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
  2013-07-11 19:12                     ` Serge Hallyn
@ 2013-07-11 20:38                       ` Tejun Heo
       [not found]                         ` <20130711203833.GA3974-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2013-07-11 20:38 UTC (permalink / raw)
  To: Serge Hallyn
  Cc: Kay Sievers,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Lennart Poettering, cgroups-u79uwXL29TY76Z2rM5mHXA

On Thu, Jul 11, 2013 at 02:12:06PM -0500, Serge Hallyn wrote:
> Before I respond to that, could you please tell me precisely what
> you mean by 'unified hierarchy'?  I thought it just meant all
> controllers composed into one mount.  Maybe it means something
> else.

Oh, it's gonna be a hierarchy which can dynamically enable / disable
controllers in sub-hierarchies, so it isn't just co-mounting
everything, which really wouldn't work for many use cases.  As some
controllers are outright hostile against being co-mounted and this is
basically gonna be v2 (or v1.1 whatever) of the itnerface, I'm trying
to weed out weird behaviors.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OFFLIST] status of devcg
       [not found]                         ` <20130711203833.GA3974-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
@ 2013-07-12 13:04                           ` Serge E. Hallyn
  0 siblings, 0 replies; 9+ messages in thread
From: Serge E. Hallyn @ 2013-07-12 13:04 UTC (permalink / raw)
  To: Tejun Heo
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA,
	containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Serge Hallyn, Kay Sievers, Lennart Poettering

Quoting Tejun Heo (tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org):
> On Thu, Jul 11, 2013 at 02:12:06PM -0500, Serge Hallyn wrote:
> > Before I respond to that, could you please tell me precisely what
> > you mean by 'unified hierarchy'?  I thought it just meant all
> > controllers composed into one mount.  Maybe it means something
> > else.
> 
> Oh, it's gonna be a hierarchy which can dynamically enable / disable
> controllers in sub-hierarchies, so it isn't just co-mounting
> everything, which really wouldn't work for many use cases.  As some

I see.  (I'll let that sink in for a bit then look back at Aristeu's
email :)

> controllers are outright hostile against being co-mounted and this is
> basically gonna be v2 (or v1.1 whatever) of the itnerface, I'm trying
> to weed out weird behaviors.
> 
> Thanks.

Thanks

-serge

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-07-12 13:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20130710184655.GB16979@mtj.dyndns.org>
     [not found] ` <20130710184655.GB16979-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-10 19:50   ` [OFFLIST] status of devcg Aristeu Rozanski
     [not found]     ` <20130710195001.GW14011-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-11  9:34       ` Daniel P. Berrange
     [not found]         ` <20130711093405.GC2377-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-07-11 15:51           ` Tejun Heo
     [not found]             ` <20130711155106.GB9229-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-11 16:05               ` Serge Hallyn
2013-07-11 17:10                 ` Tejun Heo
     [not found]                   ` <20130711171037.GB10195-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-07-11 17:11                     ` Tejun Heo
2013-07-11 19:12                     ` Serge Hallyn
2013-07-11 20:38                       ` Tejun Heo
     [not found]                         ` <20130711203833.GA3974-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2013-07-12 13:04                           ` Serge E. Hallyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).