Skip to content

Commit

Permalink
ovs-ctl: Allow add-remote without vswitchd started.
Browse files Browse the repository at this point in the history
'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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
darball1 authored and blp committed Sep 7, 2018
1 parent adf1b85 commit 70738f0
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions utilities/ovs-ctl.in
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70738f0

Please sign in to comment.