Skip to content

Commit b3d5b90

Browse files
committed
xenserver: Wait for ovs-xapi-sync to exit in "stop" command.
It seems possible that "restart" or a quick application of "stop" then "start" could kill ovs-xapi-sync without starting it again, if ovs-xapi-sync takes a little while to die, long enough for the next instance of it to see that its pidfile is still open and locked. I hope that this fixes some odd races that we've noticed in the "restart" command. Signed-off-by: Ben Pfaff <blp@nicira.com>
1 parent 18e124a commit b3d5b90

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

xenserver/etc_init.d_openvswitch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ esac
109109
: ${VSWITCHD_VALGRIND_LOG:=}
110110
: ${VSWITCHD_VALGRIND_OPT:=}
111111

112+
: ${OVS_XAPI_SYNC_PIDFILE:=/var/run/openvswitch/ovs-xapi-sync.pid}
113+
112114
# Full paths to executables & modules
113115
ovsdb_server="/usr/sbin/ovsdb-server"
114116
ovsdb_tool="/usr/bin/ovsdb-tool"
@@ -382,9 +384,7 @@ function start {
382384
function stop {
383385
stop_daemon VSWITCHD "$vswitchd"
384386
stop_daemon OVSDB_SERVER "$ovsdb_server"
385-
if [ -e /var/run/openvswitch/ovs-xapi-sync.pid ]; then
386-
kill `cat /var/run/openvswitch/ovs-xapi-sync.pid`
387-
fi
387+
stop_daemon OVS_XAPI_SYNC ovs-xapi-sync
388388
rm -f /var/lock/subsys/openvswitch
389389
}
390390

0 commit comments

Comments
 (0)