All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: [PATCH 2/3] Remove the logic in Xend to start xenstored
Date: Thu, 04 Aug 2005 11:04:26 -0500	[thread overview]
Message-ID: <42F23C8A.6040002@us.ibm.com> (raw)

[-- 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

                 reply	other threads:[~2005-08-04 16:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42F23C8A.6040002@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.