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 messages exhanged before, I addressed many of your points there. > 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 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. > The "during" version makes no sense at all, in my > opinion anyway, because we're syncronous, and there's > no way to run something "during" the veth creation. > So it actually becomes either "before" or "after" > anyway. It is "during" due to the fact that it is network type specific and gets called inside the instanciate_* (veth in this case) function. That is the only part where the host-facing interface name is known, so calling a general hook afterwards is of no use. > What makes sense -- again, in my opinion - is just > one script that gets run after netdev creation and > initialisation (when all the configured IP addresses > were assigned and the like). see above. Both is needed, a general hook that may be run after configuration and a type specific hook that can make use of veth/phys/... specific data. > > - if (lxc_create_network(&handler->conf->network)) { > > + if (lxc_create_network(handler)) { > > The two changes appears to be unrelated to the script > hook config, and makes somewhat non-obvious changes... No, it is not unrelated. The patch passes the container name to the hook scripts, which is made available to the functions by passing the lxc_handle instance around. Thanks for your feedback :-) ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel