From: Ben Pfaff Date: Tue, 16 Nov 2010 23:14:58 +0000 (-0800) Subject: Make the "exit" unixctl command reliable in ovsdb-server, ovs-vswitchd. X-Git-Tag: v1.1.0~839 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=6d37aaf186c9f4595258903241f4fa0175ecf6dd;p=sliver-openvswitch.git Make the "exit" unixctl command reliable in ovsdb-server, ovs-vswitchd. If "ovs-appctl exit" happens to hit ovsdb-server or ovs-vswitchd at a moment when nothing else is happening to wake the daemon up, it can take a long time for them to exit. This seems to account for occasional "make check" failures on Nicira's internal builds. It probably fixes some Debian automatic build failures as well. --- diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index 872cc9f9f..c7a93815b 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -149,6 +149,9 @@ main(int argc, char *argv[]) if (run_process) { process_wait(run_process); } + if (exiting) { + poll_immediate_wake(); + } poll_block(); } ovsdb_jsonrpc_server_destroy(jsonrpc); diff --git a/vswitchd/ovs-vswitchd.c b/vswitchd/ovs-vswitchd.c index c307c9286..0371e5711 100644 --- a/vswitchd/ovs-vswitchd.c +++ b/vswitchd/ovs-vswitchd.c @@ -99,6 +99,9 @@ main(int argc, char *argv[]) unixctl_server_wait(unixctl); dp_wait(); netdev_wait(); + if (exiting) { + poll_immediate_wake(); + } poll_block(); }