From: Philipp Hahn Subject: Re: Fw: [PATCH] blktap2: blktap2 and pygrub (xen-unstable) Date: Thu, 11 Nov 2010 14:31:03 +0100 Message-ID: <201011111431.08622.hahn@univention.de> References: <337066.84134.qm@web56102.mail.re3.yahoo.com> <201011010021.51382.lukaszoles@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0744618290==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============0744618290== Content-Type: multipart/signed; boundary="nextPart2899853.DWy8GOsozL"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2899853.DWy8GOsozL Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, Am Montag 08 November 2010 13:40:29 schrieb =A3ukasz Ole=B6: > 2010/11/1 =A3ukasz Ole=B6 : > > 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. =46or me to, but I observed some kind of race condition probably between ud= ev=20 creating the device node and pygrub acessing it: The first start of my doma= in=20 failed with "Disk isn't accessible", while subsequent starts worked fine. I= =20 could reproduce this after doing a reboot: 1st start failed, further starts= =20 worked fine. After adding the following hack it even worked on a freshly rebooted system= =2E=20 (For my case the loop always exited on the second iteration.) =2D-- a/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-01=20 15:33:59.000000000 +0100 +++ b/xen-4.0.1/tools/python/xen/xend/XendBootloader.py 2010-11-11=20 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 =20 from xen.util import mkdir, oshelp @@ -35,13 +36,18 @@ @param blargs Arguments to pass to the bootloader.""" =20 if not os.access(blexec, os.X_OK): =2D msg =3D "Bootloader isn't executable" + msg =3D "Bootloader '%s' isn't executable" % blexec log.error(msg) raise VmError(msg) =2D if not os.access(disk, os.R_OK): + =20 + retries =3D 10 + while not os.access(disk, os.R_OK): =2D msg =3D "Disk isn't accessible" + msg =3D "Disk '%s' isn't accessible" % disk log.error(msg) =2D raise VmError(msg) + time.sleep(1) + retries -=3D 1 + if retries <=3D 0: + raise VmError(msg) =20 if os.uname()[0] =3D=3D "NetBSD" and disk.startswith('/dev/'): disk =3D disk.replace("/dev/", "/dev/r") BYtE Philipp =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.d= e =20 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 --nextPart2899853.DWy8GOsozL Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkzb8BgACgkQYPlgoZpUDjmCDACeLtijK39EOpxzsphPHrdgiCQn VjYAn1rexRs1x9QK+LiCykQgGCvkIqDN =IlkK -----END PGP SIGNATURE----- --nextPart2899853.DWy8GOsozL-- --===============0744618290== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0744618290==--