[lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Stefan Tomanek
This commit adds an configuration option to specify a script to be executed before, during and after creating or configuring the pair of veth devices. The name of the host sided device is passed as an argument, so the script can be used to configures routes or firewall rules related to the containe

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Michael Tokarev
Stefan Tomanek wrote: > This commit adds an configuration option to specify a script to be > executed before, during and after creating or configuring the pair of > veth devices.[...] Why so many hooks? Curious... There's apparently no reason to run a script "before" creating a netdev (pair). N

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Stefan Tomanek
Dies schrieb Michael Tokarev (m...@tls.msk.ru): > Stefan Tomanek wrote: > > This commit adds an configuration option to specify a script to be > > executed before, during and after creating or configuring the pair of > > veth devices.[...] > > Why so many hooks? Curious... Please refer to the m

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Michael Tokarev
Stefan Tomanek wrote: > Dies schrieb Michael Tokarev (m...@tls.msk.ru): [] >> There's apparently no reason to run a script "before" >> creating a netdev (pair). Note that we don't even >> know which names will be used for the netdevs, at >> least in general case. > > I know, but there might be a

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Stefan Tomanek
Dies schrieb Michael Tokarev (m...@tls.msk.ru): > > I know, but there might be a point in executing a point script before > > network configuration in general. I cannot thin of an example right now, > > but Debian has the same distinction for its network configuration. > > It occured to me too th

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Daniel Lezcano
On 10/08/2010 01:23 PM, Stefan Tomanek wrote: > This commit adds an configuration option to specify a script to be > executed before, during and after creating or configuring the pair of > veth devices. The name of the host sided device is passed as an > argument, so the script can be used to confi

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Stefan Tomanek
Dies schrieb Daniel Lezcano (daniel.lezc...@free.fr): > Are we sure, we want to add these hooks (pre and post) ? I am not > against adding them, but IMO it is more sane to add them if needed > rather than adding something which may not be used. Well, until now, there was not a single hook, alth

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Michael Tokarev
Stefan Tomanek wrote: > Dies schrieb Daniel Lezcano (daniel.lezc...@free.fr): > >> Are we sure, we want to add these hooks (pre and post) ? I am not >> against adding them, but IMO it is more sane to add them if needed >> rather than adding something which may not be used. > > Well, until now,

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Daniel Lezcano
On 10/08/2010 05:13 PM, Michael Tokarev wrote: > Stefan Tomanek wrote: > >> Dies schrieb Daniel Lezcano (daniel.lezc...@free.fr): >> >> >>> Are we sure, we want to add these hooks (pre and post) ? I am not >>> against adding them, but IMO it is more sane to add them if needed >>> rather t

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Michael Tokarev
08.10.2010 19:45, Daniel Lezcano wrote: [] >> There IS a trivial way to extend system already (when >> just ONE hook is implemented) - chain your scripts. >> There's no need to re-implement shell in lxc. >> > > Michael, I am not sure I get the idea. Can you elaborate a bit ? > In our case, we

[lxc-devel] [PATCH] add lxc.network.script.up configuration hook

2010-10-08 Thread Stefan Tomanek
This commit adds a configuration option to specify a script to be executed after creating and configuring the network used by the container. The following arguments are passed to the script: * container name * config section name (net) Additional arguments depend on the config sec

Re: [lxc-devel] [PATCH] add lxc.network.script(.pre|.post|) configuration hooks

2010-10-08 Thread Stefan Tomanek
Dies schrieb Michael Tokarev (m...@tls.msk.ru): > I'm trying to say that one script is enough, that's basically it ;) > "Before" (that makes no sense), "During" and "After" - just use one > "During", with all the proper names and other parameters. That calls > a script, and that script is free to

[lxc-devel] [PATCH] add lxc.network.script.up configuration hook

2010-10-08 Thread Stefan Tomanek
This commit adds an configuration option to specify a script to be executed after creating and configuring the network used by the container. The following arguments are passed to the script: * container name * config section name (net) Additional arguments depend on the config se

[lxc-devel] [PATCH] add lxc.network.script.up configuration hook

2010-10-08 Thread Stefan Tomanek
This commit adds an configuration option to specify a script to be executed after creating and configuring the network used by the container. The following arguments are passed to the script: * container name * config section name (net) Additional arguments depend on the config se