ia64/xen-unstable
changeset 15002:dea0ba4e0de1
[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>
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
author | Tom Wilkie <tom.wilkie@gmail.com> |
---|---|
date | Wed May 02 17:14:52 2007 +0100 (2007-05-02) |
parents | 32b575a311ef |
children | 2678e31d20f3 |
files | tools/python/xen/xend/server/SrvDaemon.py tools/python/xen/xend/server/SrvServer.py |
line diff
1.1 --- a/tools/python/xen/xend/server/SrvDaemon.py Wed May 02 16:43:45 2007 +0100 1.2 +++ b/tools/python/xen/xend/server/SrvDaemon.py Wed May 02 17:14:52 2007 +0100 1.3 @@ -342,7 +342,7 @@ class Daemon: 1.4 log.info("Xend version: Unknown.") 1.5 1.6 relocate.listenRelocation() 1.7 - servers = SrvServer.create() 1.8 + servers = SrvServer.create(status) 1.9 servers.start(status) 1.10 del servers 1.11
2.1 --- a/tools/python/xen/xend/server/SrvServer.py Wed May 02 16:43:45 2007 +0100 2.2 +++ b/tools/python/xen/xend/server/SrvServer.py Wed May 02 17:14:52 2007 +0100 2.3 @@ -95,14 +95,6 @@ class XendServers: 2.4 self.cleanup(signum, frame, reloading = True) 2.5 2.6 def start(self, status): 2.7 - # Running the network script will spawn another process, which takes 2.8 - # the status fd with it unless we set FD_CLOEXEC. Failing to do this 2.9 - # causes the read in SrvDaemon to hang even when we have written here. 2.10 - if status: 2.11 - fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC) 2.12 - 2.13 - Vifctl.network('start') 2.14 - 2.15 # Prepare to catch SIGTERM (received when 'xend stop' is executed) 2.16 # and call each server's cleanup if possible 2.17 signal.signal(signal.SIGTERM, self.cleanup) 2.18 @@ -249,7 +241,15 @@ def _loadConfig(servers, root, reload): 2.19 servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False)) 2.20 2.21 2.22 -def create(): 2.23 +def create(status): 2.24 + # Running the network script will spawn another process, which takes 2.25 + # the status fd with it unless we set FD_CLOEXEC. Failing to do this 2.26 + # causes the read in SrvDaemon to hang even when we have written here. 2.27 + if status: 2.28 + fcntl.fcntl(status, fcntl.F_SETFD, fcntl.FD_CLOEXEC) 2.29 + 2.30 + Vifctl.network('start') 2.31 + 2.32 root = SrvDir() 2.33 root.putChild('xend', SrvRoot()) 2.34 servers = XendServers(root)