Quoting Stéphane Graber (stgra...@ubuntu.com): > On Wed, Oct 01, 2014 at 11:51:47AM -0400, Michael H. Warfield wrote: > > On Wed, 2014-10-01 at 11:34 -0400, Stéphane Graber wrote: > > > > [snip] > > > > > > Would this be better if this paralleled autodev an we only disabled kmsg > > > > by default if and when systemd was detected as the init system? The > > > > situation is very analogous to the autodev situation. If a user were to > > > > switch from say upstart to systemd and autodev is not specified in the > > > > config, we default that to enabled when we detect systemd as the init > > > > system at run time. We could also default kmsg to 0 in the case of > > > > systemd being the run time init system manager to prevent journald from > > > > going into it's console message loop and burning CPU. Would that work > > > > better for you? Since you can switch init systems from within the > > > > container and may not have access to the container config file that's in > > > > the host, something should be done to cover the run time case, like we > > > > do with autodev. That's what I was attempting to do... > > > > > I'm not very much fond of having to do per-init system config changes > > > but yeah, that sounds like a reasonable way to go. > > > > > If we start getting more and more of those cases we may want to make > > > things slightly more configurable by just having LXC include some > > > default configuration files based on that detection. > > > > Oh? Sort of like conditional includes? If lxc.init = systemd include > > systemd.conf sort of thing? It would have to be runtime conditional but > > that does make some sense at that. > > So I see a few ways of doing it: > 0) We keep all the logic hardcoded as it is today for autodev.
Can we get a list of the things which need to be different? AFAICS the lxc.autodev needs work, but once that work is done would be fine for non-systemd hosts. Currently, on an ubuntu system for unpriv users we have lxc.mount.entry entries for basic devices which get bind-mounted from the host. The lxc.autodev case would simply be 1. create .local/share/lxc/container/rootfs.dev 2. at container start, a. bind-mount .local/share/lxc/container/rootfs.dev to .local/share/lxc/container/rootfs.dev/rootfs/dev b. for device in console full null random tty urandom zero; do bind mount /dev/$device .local/share/lxc/container/rootfs.dev/$device (creating the file if needed) if lxc.autodev does this, is there any reason not to make autodev the default? _______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel