mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1717 (42b3442b7kXKhXN5lvR9spIGT5LsYQ)
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@lava.net] Signed-off-by: ian@xensource.com
This commit is contained in:
1 parent
86d6165ed3
commit
227aeb4d79
1 file changed
+10
-8
+10
-8
@@ -86,9 +86,7 @@ def xcs_running():
|
||||
|
||||
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 @@ def start_xcs():
|
||||
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:
|
||||
|
||||