All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] Remove the logic in Xend to start xenstored
@ 2005-08-04 16:04 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2005-08-04 16:04 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 202 bytes --]

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@us.ibm.com>

Regards,

Anthony Liguori

[-- Attachment #2: xenstored_srvdaemon.diff --]
[-- Type: text/x-patch, Size: 2068 bytes --]

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.

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-04 16:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-04 16:04 [PATCH 2/3] Remove the logic in Xend to start xenstored Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.