The ovs-ctl script was changed recently to have per-service start/stop
control. However, when that change was made the add_managers() call was
overlooked. This results in calls to `ovs-ctl --no-ovs-vswitchd start`
telling the ovsdb-server to connect to the remote controllers.

This commit disables the effect of the add_managers call if the
`--no-ovs-vswitchd` argument is given.

Fixes: 7fc28c50c012 ("ovs-ctl: Allow selective start for db and switch")
Signed-off-by: Aaron Conole <acon...@redhat.com>
---
 utilities/ovs-ctl.in | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 4aa2999..f494312 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -199,9 +199,11 @@ add_managers () {
     # churn in the database at startup or restart.  (For example, managers
     # won't briefly see empty datapath-id or ofport columns for records that
     # exist at startup.)
-    action "Enabling remote OVSDB managers" \
-       ovs-appctl -t ovsdb-server ovsdb-server/add-remote \
-           db:Open_vSwitch,Open_vSwitch,manager_options
+    if test X"$OVS_VSWITCHD" = Xyes; then
+        action "Enabling remote OVSDB managers" \
+               ovs-appctl -t ovsdb-server ovsdb-server/add-remote \
+               db:Open_vSwitch,Open_vSwitch,manager_options
+    fi
 }
 
 do_start_forwarding () {
-- 
2.7.2

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to