On Wed, Jan 12, 2011 at 2:27 PM, Apollon Oikonomopoulos <[email protected]> wrote: > On 14:23 Wed 12 Jan , Guido Trotter wrote: >> On Wed, Jan 12, 2011 at 1:47 PM, Apollon Oikonomopoulos >> <[email protected]> wrote: >> > In order to retain backwards compatibility, we ship the shell script >> > previously >> > generated by _WriteNetScript as a stand-alone script under PKGLIBDIR. The >> > script will be used for KVM instance network configuration in the absence >> > of a >> > user-provided _KVM_NETWORK_SCRIPT. >> > >> >> Should the code for overriding this script (the one that calls >> _KVM_NETWORK_SCRIPT) be in ganeti or in this script? > > I think it should be in ganeti, as it would be more forwards-compatible > if we decide to use things like hooks, multiple-stage configuration etc, > but I'm not that heavily biased. What do you think? >
My thought was to put the execution of additional scripts and/or overrides into kvm-ifup. This makes it easier for people to read the script and also to contribute patches to make networking more fit to their purposes as only bash scripting is required. On the other hand, yes, we can't start having huge amount of bash. But putting it in bash means we can also source other user-provided scripts rather than fork-execute them. :) As for the rest, yes, let's move to iproute2, I can do it, no prob. One last thing: the script should check that IP, INTERFACE and NIC_MODE are set and abort otherwise (so ganeti can report the error), then LGTM. Thanks, Guido
