[ovs-dev] [PATCH 1/2] ovs-ctl: Permit to specify additional options

Timothy Redaelli tredaelli at redhat.com
Mon Feb 11 18:55:52 UTC 2019


Currently using ovs-ctl is not possible to specify additional options
for ovs-vswitchd and ovsdb-server (for example to specify a different
loglevel during daemon startup).

This patch adds --ovs-vswitchd-options and --ovsdb-server-options
options to ovs-ctl in order to specify the additional options.

Due to word splitting it may not be possible to specify an option that
includes whitespaces.

Reported-at: https://bugzilla.redhat.com/1664794
Reported-by: Matt Flusche <mflusche at redhat.com>
Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
---
 utilities/ovs-ctl.in | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 9c2a092ea..8c5cd7032 100644
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -144,6 +144,7 @@ do_start_ovsdb () {
         set "$@" --certificate=db:Open_vSwitch,SSL,certificate
         set "$@" --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert
         [ "$OVS_USER" != "" ] && set "$@" --user "$OVS_USER"
+        [ "$OVSDB_SERVER_OPTIONS" != "" ] && set "$@" $OVSDB_SERVER_OPTIONS
 
         start_daemon "$OVSDB_SERVER_PRIORITY" "$OVSDB_SERVER_WRAPPER" "$@" \
             || return 1
@@ -213,6 +214,7 @@ do_start_forwarding () {
             set "$@" --no-self-confinement
         fi
         [ "$OVS_USER" != "" ] && set "$@" --user "$OVS_USER"
+        [ "$OVS_VSWITCHD_OPTIONS" != "" ] &&set "$@" $OVS_VSWITCHD_OPTIONS
 
         start_daemon "$OVS_VSWITCHD_PRIORITY" "$OVS_VSWITCHD_WRAPPER" "$@" ||
             return 1
@@ -326,6 +328,8 @@ set_defaults () {
     OVS_VSWITCHD_PRIORITY=-10
     OVSDB_SERVER_WRAPPER=
     OVS_VSWITCHD_WRAPPER=
+    OVSDB_SERVER_OPTIONS=
+    OVS_VSWITCHD_OPTIONS=
 
     DB_FILE=$dbdir/conf.db
     DB_SOCK=$rundir/db.sock
-- 
2.20.1



More information about the dev mailing list