Xend (the server) shouldn't be responsible for starting Xenstore as
other things may also depend on it (like consoled).
Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>
Regards,
Anthony Liguori
diff -r 1d240086de52 tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py Thu Aug 4 15:02:09 2005
+++ b/tools/python/xen/xend/server/SrvDaemon.py Thu Aug 4 11:00:18 2005
@@ -126,12 +126,8 @@
def cleanup_xend(self, kill=False):
return self.cleanup_process(XEND_PID_FILE, "xend", kill)
- def cleanup_xenstored(self, kill=False):
- return self.cleanup_process(XENSTORED_PID_FILE, "xenstored", kill)
-
def cleanup(self, kill=False):
self.cleanup_xend(kill=kill)
- #self.cleanup_xenstored(kill=kill)
def status(self):
"""Returns the status of the xend daemon.
@@ -167,31 +163,6 @@
pidfile.write(str(pid))
pidfile.close()
return pid
-
- def start_xenstored(self):
- """Fork and exec xenstored, writing its pid to XENSTORED_PID_FILE.
- """
- def mkdirs(p):
- try:
- os.makedirs(p)
- except:
- pass
- mkdirs(XENSTORED_RUN_DIR)
- mkdirs(XENSTORED_LIB_DIR)
-
- pid = self.fork_pid(XENSTORED_PID_FILE)
- if pid:
- # Parent
- log.info("Started xenstored, pid=%d", pid)
- else:
- # Child
- if XEND_DAEMONIZE:
- self.daemonize()
- if XENSTORED_DEBUG:
- os.execl("/usr/sbin/xenstored", "xenstored", "--no-fork",
- "-T", "/var/log/xenstored-trace.log")
- else:
- os.execl("/usr/sbin/xenstored", "xenstored", "--no-fork")
def daemonize(self):
if not XEND_DAEMONIZE: return
@@ -223,14 +194,10 @@
4 Insufficient privileges
"""
xend_pid = self.cleanup_xend()
- xenstored_pid = self.cleanup_xenstored()
if self.set_user():
return 4
os.chdir("/")
-
- if xenstored_pid == 0:
- self.start_xenstored()
if xend_pid > 0:
# Trying to run an already-running service is a success.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|