When called with --delete-bridges saved flows cannot be restored as the
bridges to which they belong no longer exist. This results in the following
error messages on restart.
ovs-ofctl: br0 is not a bridge or a socket
Restoring saved flows ... failed!
Although there is no effect of this error other than the message
it seems worth avoiding. This patch does so by skipping saving of flows
when --delete-bridges is in effect.
As flows are no longer saved when --delete-bridges is in effect
a side-effect of this change is that restart may be faster when
there are many flows.
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
esac
}
+save_flows_if_required () {
+ if test X"$DELETE_BRIDGES" != Xyes; then
+ action "Saving flows" ovs_save save-flows "${script_flows}"
+ fi
+}
+
save_interfaces () {
"$datadir/scripts/ovs-save" save-interfaces ${ifaces} \
> "${script_interfaces}"
action "Detected internal interfaces: $ifaces" true
init_restore_scripts
-
- action "Saving flows" ovs_save save-flows "${script_flows}"
-
+ save_flows_if_required
save_ofports_if_required
# Restart the database first, since a large database may take a
if daemon_is_running ovsdb-server && daemon_is_running ovs-vswitchd; then
init_restore_scripts
save_interfaces_if_required
- action "Saving flows" ovs_save save-flows "${script_flows}"
+ save_flows_if_required
save_ofports_if_required
fi