From: Gurucharan Shetty Date: Tue, 28 May 2013 12:53:17 +0000 (+0000) Subject: ovs-ctl.in: Add manager after restoring flows. X-Git-Tag: sliver-openvswitch-1.10.90-3~6^2~182 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=1259a0c421cc3c10f0118bbbf4f67286fbb1ae4e;p=sliver-openvswitch.git ovs-ctl.in: Add manager after restoring flows. Currently we are adding the manager after starting ovs-vswitchd. Instead, add the manager after flow restore is completed. Bug #16086. Signed-off-by: Gurucharan Shetty --- diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 1f10491df..fb33f72af 100755 --- a/utilities/ovs-ctl.in +++ b/utilities/ovs-ctl.in @@ -202,6 +202,19 @@ start_ovsdb () { fi } +add_managers () { + # Now that ovs-vswitchd has started and completed its initial + # configuration, tell ovsdb-server to conenct 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.) + action "Enabling remote OVSDB managers" \ + ovs-appctl -t ovsdb-server ovsdb-server/add-remote \ + db:Open_vSwitch,Open_vSwitch,manager_options +} + start_forwarding () { check_force_cores @@ -224,17 +237,6 @@ start_forwarding () { fi start_daemon "$OVS_VSWITCHD_PRIORITY" "$OVS_VSWITCHD_WRAPPER" "$@" fi - - # Now that ovs-vswitchd has started and completed its initial - # configuration, tell ovsdb-server to conenct 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.) - action "Enabling remote OVSDB managers" \ - ovs-appctl -t ovsdb-server ovsdb-server/add-remote \ - db:Open_vSwitch,Open_vSwitch,manager_options } ## ---- ## @@ -355,6 +357,7 @@ force_reload_kmod () { else log_warning_msg "Failed to save configuration, not replacing kernel module" start_forwarding + add_managers exit 1 fi chmod +x "$script_interfaces" @@ -373,6 +376,7 @@ force_reload_kmod () { start_forwarding restore_flows + add_managers restore_interfaces @@ -418,6 +422,7 @@ restart () { # Restore the saved flows. restore_flows + add_managers # Restore the interfaces if required. Return true even if restore fails. restore_interfaces || true @@ -664,6 +669,7 @@ case $command in start) start_ovsdb start_forwarding + add_managers ;; stop) stop_forwarding