From: Boris Derzhavets Subject: Re: [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable) Date: Sun, 11 Jul 2010 06:06:07 -0700 (PDT) Message-ID: <310033.65154.qm@web56103.mail.re3.yahoo.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0141945876==" 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: eXeC001er Cc: Xen-devel List-Id: xen-devel@lists.xenproject.org --===============0141945876== Content-Type: multipart/alternative; boundary="0-564669348-1278853567=:65154" --0-564669348-1278853567=:65154 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Patching :- diff -r c514d69c71d8 tools/python/xen/xend/XendBootloader.py --- a/tools/python/xen/xend/XendBootloader.py=A0=A0=A0 Fri Jun 04 11:39:06 = 2010 +0100 +++ b/tools/python/xen/xend/XendBootloader.py=A0=A0=A0 Sun Jun 06 23:44:20 = 2010 +0400 @@ -38,10 +38,15 @@ =A0=A0=A0=A0=A0=A0=A0=A0 msg =3D "Bootloader isn't executable" =A0=A0=A0=A0=A0=A0=A0=A0 log.error(msg) =A0=A0=A0=A0=A0=A0=A0=A0 raise VmError(msg) -=A0=A0=A0 if not os.access(disk, os.R_OK): -=A0=A0=A0=A0=A0=A0=A0 msg =3D "Disk isn't accessible" -=A0=A0=A0=A0=A0=A0=A0 log.error(msg) -=A0=A0=A0=A0=A0=A0=A0 raise VmError(msg) +=A0=A0=A0 attempt =3D 0 +=A0=A0=A0 while True: +=A0=A0=A0=A0=A0=A0=A0 if not os.access(disk, os.R_OK) and attempt > 3: +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 msg =3D "Disk isn't accessible" +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 log.error(msg) +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 raise VmError(msg) +=A0=A0=A0=A0=A0=A0=A0 else: +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 break +=A0=A0=A0=A0=A0=A0=A0 attempt =3D attempt + 1 doesn't help any longer under xen-unstable vs 4.0.1. Boris. --- On Sun, 7/11/10, eXeC001er wrote: From: eXeC001er Subject: Re: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrect parse di= sk configuration (xen-unstable) To: "Boris Derzhavets" Cc: "Xen-devel" Date: Sunday, July 11, 2010, 5:16 AM 2010/7/11 Boris Derzhavets =0AAfter patching xen-unstable (changeset:=A0=A0 21769:a672af698bc3) Rebuilt and reinstalled xen&tools. Changed=A0 "tap2:tapdisk:vhd" to "tap:vhd" =0Ayou can use: =A0"tap:vhd" or "tap:tapdisk:vhd"=0A root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c=A0 nexentastor-3= .0.2-xen.cfg =0AUsing config file "./nexentastor-3.0.2-xen.cfg". root@ServerLSX:~/NexentaStor-Community-3.0.2# Error: Device 51952 not conne= cted root@ServerLSX:/usr/local/NexentaStor-Community-3.0.2# xm create -c=A0 nexe= ntastor-3.0.2-xen.cfg =0AUsing config file "./nexentastor-3.0.2-xen.cfg". Error: Device /dev/xvdp (51952, tap2) is already connected. Yes, for fix these issues need to use other patch (I will send it during 30= min.)=0A=A0 =0ABoris. --- On Sun, 7/11/10, eXeC001er wrote: =0A From: eXeC001er=0A Subject: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrect parse disk c= onfiguration (xen-unstable) To: "Xen-devel" =0ADate: Sunday, July 11, 2010, 4:16 AM Current source-code work if use following configuration:config example: =A0= =A0disk=3D['tap:vhd:/path/../disk.img,xvda,w']=0A=0A=0A=0A but not work if use:config example: =A0 =A0disk=3D['tap:tapdisk:vhd:/path/.= ./disk.img,xvda,w']=0A=0A=0A=0AError during start DomU: =A0 =A0File 'vhd:/p= ath/.../disk.img' doesn't exist.=0A=0A=0A=0A this patch fix this bug.=0A=0A=0A=0A Signed-off-by: eXeC001er =0A=0A=0A=0A Thanks.=0A=0A=0A=0A -----Inline Attachment Follows----- _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel =0A =0A=0A=0A=0A=0A=0A=0A=0A =20 =0A=0A=0A=0A --0-564669348-1278853567=:65154 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Patching :-

diff -r c514d69c71d8 tools= /python/xen/xend/XendBootloader.py
--- a/tools/python/xen/xend/XendBootl= oader.py    Fri Jun 04 11:39:06 2010 +0100
+++ b/tools/py= thon/xen/xend/XendBootloader.py    Sun Jun 06 23:44:20 2010 = +0400
@@ -38,10 +38,15 @@
       &= nbsp; msg =3D "Bootloader isn't executable"
    &nbs= p;    log.error(msg)
      =    raise VmError(msg)
-    if not os.access(dis= k, os.R_OK):
-        msg =3D "Disk i= sn't accessible"
-        log.error(m= sg)
-        raise VmError(msg)
+&= nbsp;   attempt =3D 0
+    while True:
+        if not os.access(disk= , os.R_OK) and attempt > 3:
+      &nbs= p;     msg =3D "Disk isn't accessible"
+  =           log.error(msg)
+&= nbsp;           raise VmE= rror(msg)
+        else:
+ &n= bsp;          break
+ =        attempt =3D attempt + 1

doesn't= help any longer under xen-unstable vs 4.0.1.

Boris.

--- On <= b>Sun, 7/11/10, eXeC001er <execooler@gmail.com> wrote:
=

From: eXeC001er <execooler@gmail.com>Subject: Re: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
To: "Boris Derzhavets" <bderzhave= ts@yahoo.com>
Cc: "Xen-devel" <xen-devel@lists.xensource.com>Date: Sunday, July 11, 2010, 5:16 AM


2010/7/11 Boris Derzhavets <bderzhavets@yah= oo.com>
=0A<= tr>
After patching xen-unst= able (changeset:   21769:a672af698bc3)
Rebuilt and reinstalled= xen&tools.
Changed  "tap2:tapdisk:vhd" to "tap:vhd"
=0A
you can use:  "tap:vhd" or "tap:tapdisk:vhd= "
=0A
=

root@ServerLSX:~/NexentaStor-C= ommunity-3.0.2# xm create -c  nexentastor-3.0.2-xen.cfg
=0AUsing co= nfig file "./nexentastor-3.0.2-xen.cfg".
root@ServerLSX:~/NexentaStor-Co= mmunity-3.0.2# Error: Device 51952 not connected

root@ServerLSX:/usr= /local/NexentaStor-Community-3.0.2# xm create -c  nexentastor-3.0.2-xe= n.cfg
=0AUsing config file "./nexentastor-3.0.2-xen.cfg".
Error: Devi= ce /dev/xvdp (51952, tap2) is already connected.

Yes, for fix these issues need to= use other patch (I will send it during 30 min.)
=0A
 
<= blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; border= -left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

=0ABoris.

--- On Sun, 7/11/10, eXeC001= er <execooler@gmail.c= om> wrote:
=0A
From: eXeC001e= r=0A <execooler@gmail.c= om>
Subject: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrec= t parse disk configuration (xen-unstable)
To: "Xen-devel" <xen-devel@lists.x= ensource.com>
=0ADate: Sunday, July 11, 2010, 4:16 AM


Current source-code work if use fol= lowing configuration:
config example:    disk=3D['tap:vhd:/path/../disk.img,xvda,w']=
=0A=0A=0A=0A

but not work if use:
config= example:    disk=3D['tap:= tapdisk:vhd:/path/../disk.img,xvda,w']
=0A=0A=0A=0A
Error during start DomU:    File 'vhd:/path/.../disk.img' doesn't exist.
= =0A=0A=0A=0A

this patch fix this bug.<= /font>
=0A=0A=0A=0A

Signed-off-by: eXeC001er <execooler@gmail.com>
=0A=0A=0A=0A

Thanks.
=0A=0A=0A=0A

-----Inline Attachment Fol= lows-----

_______________________________________________
Xe= n-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
=0A

=0A=0A=0A=0A=0A=0A=0A=0A

=0A

=0A=0A = --0-564669348-1278853567=:65154-- --===============0141945876== 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 --===============0141945876==--