diff mbox series

[ovs-dev,v2] ovs-ctl: Allow add-remote without vswitchd started.

Message ID 1536277247-53460-1-git-send-email-dlu998@gmail.com
State Accepted
Headers show
Series [ovs-dev,v2] ovs-ctl: Allow add-remote without vswitchd started. | expand

Commit Message

Darrell Ball Sept. 6, 2018, 11:40 p.m. UTC
'add_managers ()' is filtering add-remote if vswitchd is not started.
However, if we actually filter here we end up with a bricked system,
blackholing all traffic.  Allowing add_manager() to proceed may mean
extra churn in controllers in some cases, but this is far better than
the alternative of a bricked system.

Signed-off-by: Darrell Ball <dlu998@gmail.com>
---
 utilities/ovs-ctl.in | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
 mode change 100755 => 100644 utilities/ovs-ctl.in

Comments

Ben Pfaff Sept. 7, 2018, 2:32 a.m. UTC | #1
On Thu, Sep 06, 2018 at 04:40:47PM -0700, Darrell Ball wrote:
> 'add_managers ()' is filtering add-remote if vswitchd is not started.
> However, if we actually filter here we end up with a bricked system,
> blackholing all traffic.  Allowing add_manager() to proceed may mean
> extra churn in controllers in some cases, but this is far better than
> the alternative of a bricked system.
> 
> Signed-off-by: Darrell Ball <dlu998@gmail.com>

Thanks, applied and backported.
diff mbox series

Patch

diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
old mode 100755
new mode 100644
index 43c8f32..749de99
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -164,16 +164,14 @@  start_ovsdb() {
 }
 
 add_managers () {
-    # Now that ovs-vswitchd has started and completed its initial
-    # configuration, tell ovsdb-server to connect to the remote managers.  We
-    # used to do this at ovsdb-server startup time, but waiting for
-    # ovs-vswitchd to finish configuring means that remote managers see less
-    # 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.)
+    # Tell ovsdb-server to connect to the remote managers. If ovs-vswitchd
+    # is not finished configuring, it may mean that remote managers will
+    # see more churn in the database at startup or restart. (For example,
+    # managers may briefly see empty datapath-id or ofport columns for
+    # records that exist at startup.).  However, the alternative is a
+    # 'bricked' system, so we allow database connectivity regardless.
     if test X"$OVSDB_SERVER" = Xyes || test X"$OVS_VSWITCHD" = Xyes; then
-        if daemon_is_running ovsdb-server \
-                && daemon_is_running ovs-vswitchd; then
+        if daemon_is_running ovsdb-server; then
             action "Enabling remote OVSDB managers" \
                    ovs-appctl -t ovsdb-server ovsdb-server/add-remote \
                    db:Open_vSwitch,Open_vSwitch,manager_options