Quoting Christian Seiler (christ...@iwakd.de): > Hi Serge, > > Thanks for testing / reviewing! > > > I'd like to just get rid of mountcgroups and make this a > > configurable option straight in lxc, which when set will cause lxc, > > for every mountpoint which is in handler->cgroup, bind-mount the > > the container init's directory into the container. The question is, > > would $rootfs/sys/fs/cgroup/$controllername be an ok assumption for > > all distributions? If not maybe we can't do this universally... > > But I should think it'd be ok. > > As far as I know /sys/fs/cgroup/$controller with appropriate symlinks > (i.e. if cpu and cpuacct are mounted together, create a directory > cpu,cpuacct and symlink cpu and cpuacct to that directory) has become > standard. So I'd suggest using that as the current path to go forward, > and see later if we have to adjust that due to distribution's needs - > it's definitely better than the current state where cgroup support is > not available at all in containers out of the box. (Also, if somebody > needs something else, they can write an own hook and disable this > automation.) > > Side note: But instead of mounting the container's directory directly to > /sys/fs/cgroup/$controller: as I said in an earlier thread it would > probably be better to mount the container's cgroup directory into > /sys/fs/cgroup/$controller/$cgrouppath and create that recursively > inside a tmpfs. Otherwise, this might really confuse other software that > looks for cgroups in specific locations.
Ah, right. Agreed. > If you're interested, I could implement that. Very interested if you have time! > > In the meantime I'm going to push your patch to staging. > > Great, thanks! > > Final thought: Generally speaking, it'd probably be a good idea to have > some kind of support in LXC to mount all standard file systems (/proc, > /sys, tmpfs-/run, cgroups, etc.) which may be specified as a > configuration option. For example: 'lxc.mount.auto = proc sys run > cgroups' or so. That would save a lot of useless fstab entries in the > lxc configuration, ideally you'd need nothing for the simplest > configurations. Hm. Definately worth thinking about. Now there are still lots of people who want the bare minimum, and all mounted read-only... but so long as we don't make the auto-mounts the default we shouldn't be bothering them. thanks, -serge ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. Consolidate legacy IT systems to a single system of record for IT 2. Standardize and globalize service processes across IT 3. Implement zero-touch automation to replace manual, redundant tasks http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel