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

[Xen-changelog] When xend starts, it fires off xcs. If you're running o

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] When xend starts, it fires off xcs. If you're running on a slow
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Fri, 17 Jun 2005 21:44:11 +0000
Delivery-date: Sat, 18 Jun 2005 01:03:10 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1717, 2005/06/17 22:44:11+01:00, iap10@xxxxxxxxxxxxxxxxxxx

        When xend starts, it fires off xcs.  If you're running on a slow
        machine its possible that xcs started but xend didnt wait long 
        enough to notice.  The attached patch loops several times while 
        waiting for xcs to come up.  It seems to be working here while the 
        original is not (slow machine here).
        
        From: Tim Newsham [newsham@xxxxxxxx]
        Signed-off-by: ian@xxxxxxxxxxxxx



 xend |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)


diff -Nru a/tools/misc/xend b/tools/misc/xend
--- a/tools/misc/xend   2005-06-17 21:04:16 -04:00
+++ b/tools/misc/xend   2005-06-17 21:04:16 -04:00
@@ -86,9 +86,7 @@
     
 def start_xcs():
     if (not xcs_running()):
-        if os.fork():
-            time.sleep(0.1) # let xcs start
-        else:
+        if os.fork() == 0 :
             if not os.path.isdir(os.path.dirname(XCS_PATH)):
                 os.makedirs(os.path.dirname(XCS_PATH))
             try:
@@ -98,11 +96,15 @@
                 msg("Tried to start xcs, but failed. Is it installed?")
                 hline()
                 raise CheckError("couldn't start xcs")
-        if (not xcs_running()):
-            hline()
-            msg("Failed to start the control interface switch.")
-            hline()
-            raise CheckError("xcs not running")
+        for n in range(10) :
+            if (xcs_running()):
+                break
+            time.sleep(0.1)
+        else :
+                hline()
+                msg("Failed to start the control interface switch.")
+                hline()
+                raise CheckError("xcs not running")
             
 def stop_xcs():
     try:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] When xend starts, it fires off xcs. If you're running on a slow, BitKeeper Bot <=