[ovs-dev] [PATCH 2/2] xenserver, rhel, debian: Use ovs-ctl restart.

Gurucharan Shetty gshetty at nicira.com
Fri Oct 19 18:06:28 UTC 2012


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".

Feature #13555.
Signed-off-by: Gurucharan Shetty<gshetty at nicira.com>
---
 debian/openvswitch-switch.init   |    3 +--
 rhel/etc_init.d_openvswitch      |    3 +--
 xenserver/etc_init.d_openvswitch |    4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
index f650f87..9a081e7 100755
--- a/debian/openvswitch-switch.init
+++ b/debian/openvswitch-switch.init
@@ -89,8 +89,7 @@ case $1 in
         # The OVS daemons keep up-to-date.
         ;;
     restart)
-        stop
-        start
+        start restart
         ;;
     status)
         ovs_ctl status
diff --git a/rhel/etc_init.d_openvswitch b/rhel/etc_init.d_openvswitch
index ad7579c..380788e 100755
--- a/rhel/etc_init.d_openvswitch
+++ b/rhel/etc_init.d_openvswitch
@@ -70,8 +70,7 @@ case $1 in
         stop
         ;;
     restart)
-        stop
-        start
+        start restart
         ;;
     reload|force-reload)
         # Nothing to do.
diff --git a/xenserver/etc_init.d_openvswitch b/xenserver/etc_init.d_openvswitch
index a199825..6cbc5e3 100755
--- a/xenserver/etc_init.d_openvswitch
+++ b/xenserver/etc_init.d_openvswitch
@@ -116,8 +116,8 @@ case $1 in
         stop
         ;;
     restart)
-        stop
-        start
+        stop_daemon ovs-xapi-sync
+        start restart
         ;;
     reload|force-reload)
         # The main OVS daemons keep up-to-date, but ovs-xapi-sync needs help.
-- 
1.7.2.5




More information about the dev mailing list