Re: [lxc-devel] Getting some hooks into the container configuration

2012-05-25 Thread Matthijs Kooijman
Hi Stéphane, > - stop: Is run after the container died > [...] > Potential other hooks include pre-start and post-stop What would be the difference between stop and post-stop, if stop also runs _after_ the container died? Gr. Matthijs signature.asc Description: Digital signature -

[lxc-devel] Creating an lxc-config binary

2012-04-30 Thread Matthijs Kooijman
Hi folks, while writing scripts, I occasionally miss an lxc-config command, that can parse (and possibly also write) the lxc config files for me in a robust way. Sure, it's an easy format to just grep and sed over (or at least it looks like that at first glance), but that's not very future-proof o

Re: [lxc-devel] Running avahi in multiple containers: fork() failed: Resource temporarily unavailable

2012-04-30 Thread Matthijs Kooijman
Hi Serge, > User namespaces in recent kernels will probably not be usable for > containers. Eric is heavily developing them right now, and hopefully > in the next 6-12 months they'll be fully supported. Right, so I guess enabling them by default isn't a good idea right now :-) > So if you can't

[lxc-devel] Running avahi in multiple containers: fork() failed: Resource temporarily unavailable

2012-04-30 Thread Matthijs Kooijman
Hi folks, I'm trying to run the avahi daemon in my containers, but I'm running into this error: fork() failed: Resource temporarily unavailable Avahi starts fine in the first container, but starting it in any subsequent starting attempts result in the above error. This issue was raised befo

[lxc-devel] Unsharing user namespaces (to make avahi work)

2011-09-23 Thread Matthijs Kooijman
Hi folks, I was having some trouble with running avahi in multiple containers and then found this thread: http://comments.gmane.org/gmane.linux.kernel.containers.lxc.general/189 It suggests to "ushare the user namespaces" by adding CLONE_NEWUSER to the clone_flags in start.c. I've just tried this

[lxc-devel] [PATCH 3/3] document lxc.network.ipv[46].gateway options

2011-08-15 Thread Matthijs Kooijman
--- doc/lxc.conf.sgml.in | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/doc/lxc.conf.sgml.in b/doc/lxc.conf.sgml.in index cfaa686..532739e 100644 --- a/doc/lxc.conf.sgml.in +++ b/doc/lxc.conf.sgml.in @@ -300,6 +300,28 @@ Foundati

[lxc-devel] Patch to automatically set a gateway inside a container

2011-08-15 Thread Matthijs Kooijman
Hey folks, Here's a small patch series that allows setting up a gateway inside a container. Two modes are supported: Defining a static address in lxc.conf, or taking the configured address from the bridge (link) interface and using that as a gateway. The latter is usefule when a number of contain

[lxc-devel] [PATCH 2/3] add autodetection of the gateway address

2011-08-15 Thread Matthijs Kooijman
For veth and macvlan networks, this can look up the host address on the bridge (link) interface and add a default route on the guest to that address. This facilitates a typical setup where guests are bridged together. syntax: lxc.ipv4.gateway = auto lxc.ipv6.gateway = auto --- src

[lxc-devel] [PATCH 1/3] add lxc.network.ipv[46].gateway configuration

2011-08-15 Thread Matthijs Kooijman
This directive adds a default route to the guest at startup. syntax: lxc.network.ipv4.gateway = 10.0.0.1 lxc.network.ipv6.gateway = 2001:db8:85a3::8a2e:370:7334 --- src/lxc/conf.c| 45 ++ src/lxc/conf.h|2 + src/lxc/confile.c | 66 ++