From 87378a8770f54f1efaf91920077c65c45398f227 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 15 Jun 2012 10:26:34 -0700 Subject: [PATCH] xenserver, rhel: Enable extra ovs-ctl options from init scripts. This is useful for passing wrapper script options and possibly for other purposes. Bug #11889. Signed-off-by: Ben Pfaff --- rhel/etc_init.d_openvswitch | 1 + rhel/usr_share_openvswitch_scripts_sysconfig.template | 4 ++++ xenserver/etc_init.d_openvswitch | 1 + xenserver/usr_share_openvswitch_scripts_sysconfig.template | 4 ++++ 4 files changed, 10 insertions(+) diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch index 6642f280..ad7579cd 100755 --- a/rhel/etc_init.d_openvswitch +++ b/rhel/etc_init.d_openvswitch @@ -48,6 +48,7 @@ start () { if test X"$BRCOMPAT" = Xyes; then set "$@" --brcompat fi + set "$@" $OVS_CTL_OPTS "$@" $ovs_ctl --protocol=gre enable-protocol diff --git a/rhel/usr_share_openvswitch_scripts_sysconfig.template b/rhel/usr_share_openvswitch_scripts_sysconfig.template index 812060d3..cad1f531 100644 --- a/rhel/usr_share_openvswitch_scripts_sysconfig.template +++ b/rhel/usr_share_openvswitch_scripts_sysconfig.template @@ -21,3 +21,7 @@ # BRCOMPAT: If 'yes' compatibility mode will be enabled. # BRCOMPAT=yes + +# OVS_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, +# a suitable place to specify --ovs-vswitchd-wrapper=valgrind. +# OVS_CTL_OPTS= diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch index b2248b7a..a1998251 100755 --- a/xenserver/etc_init.d_openvswitch +++ b/xenserver/etc_init.d_openvswitch @@ -76,6 +76,7 @@ start () { touch /var/run/openvswitch.booted set "$@" --delete-bridges fi + set "$@" $OVS_CTL_OPTS "$@" start_ovs_xapi_sync diff --git a/xenserver/usr_share_openvswitch_scripts_sysconfig.template b/xenserver/usr_share_openvswitch_scripts_sysconfig.template index bb85d67a..2c084529 100644 --- a/xenserver/usr_share_openvswitch_scripts_sysconfig.template +++ b/xenserver/usr_share_openvswitch_scripts_sysconfig.template @@ -18,3 +18,7 @@ # system memory pressure in extraordinary situations, such as multiple # concurrent VM import operations. # VSWITCHD_MLOCKALL=yes + +# OVS_CTL_OPTS: Extra options to pass to ovs-ctl. This is, for example, +# a suitable place to specify --ovs-vswitchd-wrapper=valgrind. +# OVS_CTL_OPTS= -- 2.30.2