[ovs-dev] [PATCH] openvswitch init script modifications for kvm and lxc hosts

Patrick Mullaney pm.mullaney at gmail.com
Tue Dec 14 21:25:33 UTC 2010


Hi Ben,

Comments below.

On Tue, 2010-12-14 at 11:42 -0800, Ben Pfaff wrote:
> On Mon, Dec 13, 2010 at 05:49:46PM -0500, Patrick Mullaney wrote:
> > Signed-off-by: Patrick Mullaney <pm.mullaney at gmail.com>
> 
> Thank you for the patch.  Most of this looks pretty good.  I have some
> questions and comments.
> 
> The /etc/sysconfig/openvswitch added by this patch conflicts with the
> one that the init script already expects to find, which is generated
> on XenServer from the template that is included as
> xenserver/usr_share_openvswitch_scripts_sysconfig.template. 

Yea, I thought about adding that NETWORK_MODE to your template and
installing that. Having that one line in the sea of comments made
me worry that it would get missed. I'm all for going back in that
direction if you would like.

>  
> 
> It would make sense to add $NETWORK_MODE to that template, if it is
> needed on SuSE.  Is it needed?  (It is used on XenServer because it has
> two different modes of operations, one that uses OVS, one that uses the
> Linux bridge.)  Would it make sense to name it something different,
> e.g. ENABLE_OVS?

I wanted to change the script as little as possible and maintain the
xenserver behavior. Right now, if xenserver is not installed
NETWORK_MODE should default to openvswitch(which is desired if you
enable it). If xenserver happens to get installed(on suse for example),
NETWORK_MODE should get set via the source of /etc/xensource-inventory.
I'm not sure how changing the variable name or adding a new one would
help but I am open to a suggestion(I'm probably missing something).
It seems if you install and enable openvswitch that should be enough
state to know you want to enable it.

> 
> It doesn't make sense to install etc_init.d_openvswitch-xapi-update on
> SuSE at all, since it will at most print an error message and exit with
> status 1.  So it seems unnecessary to modify that file.

I can not package it, but on the chance that someone wanted to use suse
and xenserver, it might be easier if it was just there. My changes were
just about LSB compliance, other distros might care about this too.

Another approach might be to move basic startup into a separate common
script area and then have the xenserver scripts deal with starting
stuff specific to it. I don't have xenserver here and didn't watnt to
break it on a first attempt. The nice part is I think this should
work for both cases now.

Thanks.

> 
> Thanks,
> 
> Ben.






More information about the dev mailing list