vswitch: Fix indefinite wait on reload.
authorBen Pfaff <blp@nicira.com>
Thu, 16 Apr 2009 00:21:26 +0000 (17:21 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 16 Apr 2009 00:21:26 +0000 (17:21 -0700)
If a "reload" command was sent to vswitchd via the unixctl library, then
the reconfiguration would not actually happen until another round trip
through the vswitchd poll loop.  Ordinarily this happens quickly but if
nothing is going on it can become an indefinite wait.

Fix by forcing another round trip if we need to reconfigure.

vswitchd/vswitchd.c

index f3049b02eb5371bae15db9a084c78728e683701d..ba0acf07685ba4d99c7e28eb98a225feecc754c5 100644 (file)
@@ -109,6 +109,9 @@ main(int argc, char *argv[])
         }
         unixctl_server_run(unixctl);
 
+        if (need_reconfigure) {
+            poll_immediate_wake();
+        }
         signal_wait(sighup);
         mgmt_wait();
         bridge_wait();