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.
The fix presented will defer signaling to remote managers until the
following are both true:
1. At least one of OVSDB_SERVER or OVS_VSWITCHD was told to start
2. Both daemons are running.
Fixes:
7fc28c50c012 ("ovs-ctl: Allow selective start for db and switch")
Signed-off-by: Aaron Conole <aconole@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
# 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"$OVSDB_SERVER" = Xyes || test X"$OVS_VSWITCHD" = Xyes; then
+ if daemon_is_running ovsdb-server \
+ && daemon_is_running ovs-vswitchd; then
+ action "Enabling remote OVSDB managers" \
+ ovs-appctl -t ovsdb-server ovsdb-server/add-remote \
+ db:Open_vSwitch,Open_vSwitch,manager_options
+ fi
+ fi
}
do_start_forwarding () {