diff options
author | Tom Wilkie <tom.wilkie@gmail.com> | 2007-05-02 17:14:52 +0100 |
---|---|---|
committer | Tom Wilkie <tom.wilkie@gmail.com> | 2007-05-02 17:14:52 +0100 |
commit | ffed4cf8e83d7baedcac0bcbb3ae25acbe3da503 (patch) | |
tree | b72acc7b2967f6e618f1118eb01d01d19f28bf62 | |
parent | 7601e982d4ae3891a430dffa33c13801ba0a7f4b (diff) | |
download | xen-ffed4cf8e83d7baedcac0bcbb3ae25acbe3da503.tar.gz xen-ffed4cf8e83d7baedcac0bcbb3ae25acbe3da503.tar.bz2 xen-ffed4cf8e83d7baedcac0bcbb3ae25acbe3da503.zip |
[XEND] Move Vifctl.network('start') earlier in Xend startup so XendNode can find networks when its initialised.
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
-rw-r--r-- | tools/python/xen/xend/server/SrvDaemon.py | 2 | ||||
-rw-r--r-- | tools/python/xen/xend/server/SrvServer.py | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/tools/python/xen/xend/server/SrvDaemon.py b/tools/python/xen/xend/server/SrvDaemon.py index a265aef906..ccb485d1fb 100644 --- a/tools/python/xen/xend/server/SrvDaemon.py +++ b/tools/python/xen/xend/server/SrvDaemon.py @@ -342,7 +342,7 @@ class Daemon: log.info("Xend version: Unknown.") relocate.listenRelocation() - servers = SrvServer.create() + servers = SrvServer.create(status) servers.start(status) del servers diff --git a/tools/python/xen/xend/server/SrvServer.py b/tools/python/xen/xend/server/SrvServer.py index 10a09a4c56..544be9725d 100644 --- a/tools/python/xen/xend/server/SrvServer.py +++ b/tools/python/xen/xend/server/SrvServer.py @@ -95,14 +95,6 @@ class XendServers: self.cleanup(signum, frame, reloading = True) def start(self, status): - # Running the network script will spawn another process, which takes - # the status fd with it unless we set FD_CLOEXEC. Failing to do this - # causes the read in SrvDaemon to hang even when we have written here. - if status: - fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC) - - Vifctl.network('start') - # Prepare to catch SIGTERM (received when 'xend stop' is executed) # and call each server's cleanup if possible signal.signal(signal.SIGTERM, self.cleanup) @@ -249,7 +241,15 @@ def _loadConfig(servers, root, reload): servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False)) -def create(): +def create(status): + # Running the network script will spawn another process, which takes + # the status fd with it unless we set FD_CLOEXEC. Failing to do this + # causes the read in SrvDaemon to hang even when we have written here. + if status: + fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC) + + Vifctl.network('start') + root = SrvDir() root.putChild('xend', SrvRoot()) servers = XendServers(root) |