Hello,
Am Montag 08 November 2010 13:40:29 schrieb Łukasz Oleś:
> 2010/11/1 Łukasz Oleś <lukaszoles@xxxxxxxxx>:
> > On Monday 16 August 2010 18:35:10 Stefano Stabellini wrote:
> >> On Sun, 1 Aug 2010, Boris Derzhavets wrote:
> >> > Forwarding to you original patch requested.
> >> > It works for me.
For me to, but I observed some kind of race condition probably between udev
creating the device node and pygrub acessing it: The first start of my domain
failed with "Disk isn't accessible", while subsequent starts worked fine. I
could reproduce this after doing a reboot: 1st start failed, further starts
worked fine.
After adding the following hack it even worked on a freshly rebooted system.
(For my case the loop always exited on the second iteration.)
--- a/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-01
15:33:59.000000000 +0100
+++ b/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-11
13:36:13.000000000 +0100
@@ -15,6 +15,7 @@
import os, select, errno, stat, signal, tty
import random
import shlex
+import time
from xen.xend import sxp
from xen.util import mkdir, oshelp
@@ -35,13 +36,18 @@
@param blargs Arguments to pass to the bootloader."""
if not os.access(blexec, os.X_OK):
- msg = "Bootloader isn't executable"
+ msg = "Bootloader '%s' isn't executable" % blexec
log.error(msg)
raise VmError(msg)
- if not os.access(disk, os.R_OK):
+
+ retries = 10
+ while not os.access(disk, os.R_OK):
- msg = "Disk isn't accessible"
+ msg = "Disk '%s' isn't accessible" % disk
log.error(msg)
- raise VmError(msg)
+ time.sleep(1)
+ retries -= 1
+ if retries <= 0:
+ raise VmError(msg)
if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'):
disk = disk.replace("/dev/", "/dev/r")
BYtE
Philipp
--
Philipp Hahn Open Source Software Engineer hahn@xxxxxxxxxxxxx
Univention GmbH Linux for Your Business fon: +49 421 22 232- 0
Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99
http://www.univention.de
signature.asc
Description: This is a digitally signed message part.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|