ovs-ctl has a new command called "restart" which
saves and restores the openflow flows on bridges.
Use that command from the init scripts when doing
a "restart --save-flows=yes".
Also, the debian package postinst script can
set the variable OVS_RESTART_SAVE_FLOWS to "yes"
to ask for save and restore of flows.
Feature #13555.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
ovs_ctl stop
}
+restart () {
+ # OVS_RESTART_SAVE_FLOWS can be set by package postinst script.
+ if [ "$OVS_RESTART_SAVE_FLOWS" = "yes" ] || \
+ [ "$1" = "--save-flows=yes" ]; then
+ start restart
+ else
+ stop
+ start
+ fi
+}
+
case $1 in
start)
start
# The OVS daemons keep up-to-date.
;;
restart)
- stop
- start
+ shift
+ restart "$@"
;;
status)
ovs_ctl status
rm -f /var/lock/subsys/openvswitch
}
+restart () {
+ if [ "$1" = "--save-flows=yes" ]; then
+ start restart
+ else
+ stop
+ start
+ fi
+}
+
ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl
case $1 in
start)
stop
;;
restart)
- stop
- start
+ shift
+ restart "$@"
;;
reload|force-reload)
# Nothing to do.
rm -f /var/lock/subsys/openvswitch
}
+restart () {
+ if [ "$1" = "--save-flows=yes" ]; then
+ stop_daemon ovs-xapi-sync
+ start restart
+ else
+ stop
+ start
+ fi
+}
+
ovs_ctl=/usr/share/openvswitch/scripts/ovs-ctl
case $1 in
start)
stop
;;
restart)
- stop
- start
+ shift
+ restart "$@"
;;
reload|force-reload)
# The main OVS daemons keep up-to-date, but ovs-xapi-sync needs help.