WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 2/3] Remove the logic in Xend to start xenstored

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 2/3] Remove the logic in Xend to start xenstored
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Thu, 04 Aug 2005 11:04:26 -0500
Delivery-date: Thu, 04 Aug 2005 19:54:36 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050317)
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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH 2/3] Remove the logic in Xend to start xenstored, Anthony Liguori <=