xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
@ 2010-07-11  8:16 eXeC001er
  0 siblings, 0 replies; 4+ messages in thread
From: eXeC001er @ 2010-07-11  8:16 UTC (permalink / raw)
  To: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 365 bytes --]

Current source-code work if use following configuration:
config example:    disk=['tap:vhd:/path/../disk.img,xvda,w']

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

this patch fix this bug.

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

Thanks.

[-- Attachment #1.2: Type: text/html, Size: 1768 bytes --]

[-- Attachment #2: blktap_incorrect_parse.patch --]
[-- Type: text/x-patch, Size: 567 bytes --]

diff -r a672af698bc3 tools/python/xen/util/blkif.py
--- a/tools/python/xen/util/blkif.py	Fri Jul 09 12:35:58 2010 +0100
+++ b/tools/python/xen/util/blkif.py	Sun Jul 11 12:13:34 2010 +0400
@@ -87,7 +87,10 @@
                 fn = "/dev/%s" %(fn,)
                
         if typ in ("tap", "tap2"):
-            (taptype, fn) = fn.split(":", 1)
+            if fn.count(":") == 1:
+                (taptype, fn) = fn.split(":", 1)
+            else:
+                (taptype, fn) = fn.split(":", 2)[1:3]
     return (fn, taptype)
 
 def blkdev_uname_to_file(uname):

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
@ 2010-07-11  8:57 Boris Derzhavets
  2010-07-11  9:16 ` eXeC001er
  0 siblings, 1 reply; 4+ messages in thread
From: Boris Derzhavets @ 2010-07-11  8:57 UTC (permalink / raw)
  To: Xen-devel, eXeC001er


[-- Attachment #1.1: Type: text/plain, Size: 1471 bytes --]

After patching xen-unstable (changeset:   21769:a672af698bc3)
Rebuilt and reinstalled xen&tools.
Changed  "tap2:tapdisk:vhd" to "tap:vhd"

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c  nexentastor-3.0.2-xen.cfg
Using config file "./nexentastor-3.0.2-xen.cfg".
root@ServerLSX:~/NexentaStor-Community-3.0.2# Error: Device 51952 not connected

root@ServerLSX:/usr/local/NexentaStor-Community-3.0.2# xm create -c  nexentastor-3.0.2-xen.cfg
Using config file "./nexentastor-3.0.2-xen.cfg".
Error: Device /dev/xvdp (51952, tap2) is already connected.

Boris.

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

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

Current source-code work if use following configuration:config example:    disk=['tap:vhd:/path/../disk.img,xvda,w']



but not work if use:config example:    disk=['tap:tapdisk:vhd:/path/../disk.img,xvda,w']


Error during start DomU:    File 'vhd:/path/.../disk.img' doesn't exist.



this patch fix this bug.



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



Thanks.



-----Inline Attachment Follows-----

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



      

[-- Attachment #1.2: Type: text/html, Size: 3401 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
  2010-07-11  8:57 Boris Derzhavets
@ 2010-07-11  9:16 ` eXeC001er
  2010-07-11 13:06   ` Boris Derzhavets
  0 siblings, 1 reply; 4+ messages in thread
From: eXeC001er @ 2010-07-11  9:16 UTC (permalink / raw)
  To: Boris Derzhavets; +Cc: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 1670 bytes --]

2010/7/11 Boris Derzhavets <bderzhavets@yahoo.com>

> After patching xen-unstable (changeset:   21769:a672af698bc3)
> Rebuilt and reinstalled xen&tools.
> Changed  "tap2:tapdisk:vhd" to "tap:vhd"
>
you can use:  "tap:vhd" or "tap:tapdisk:vhd"

>
> root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
> nexentastor-3.0.2-xen.cfg
> Using config file "./nexentastor-3.0.2-xen.cfg".
> root@ServerLSX:~/NexentaStor-Community-3.0.2# Error: Device 51952 not
> connected
>
> root@ServerLSX:/usr/local/NexentaStor-Community-3.0.2# xm create -c
> nexentastor-3.0.2-xen.cfg
> Using 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.)


>
> Boris.
>
> --- On *Sun, 7/11/10, eXeC001er <execooler@gmail.com>* wrote:
>
>
> From: eXeC001er <execooler@gmail.com>
> Subject: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrect parse disk
> configuration (xen-unstable)
> To: "Xen-devel" <xen-devel@lists.xensource.com>
> Date: Sunday, July 11, 2010, 4:16 AM
>
>
> Current source-code work if use following configuration:
> config example:    disk=['tap:vhd:/path/../disk.img,xvda,w']
>
> but not work if use:
> config example:    disk=['tap:tapdisk:vhd:/path/../disk.img,xvda,w']
> Error during start DomU:    File 'vhd:/path/.../disk.img' doesn't exist.
>
> this patch fix this bug.
>
> Signed-off-by: eXeC001er <execooler@gmail.com>
>
> Thanks.
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
>
>

[-- Attachment #1.2: Type: text/html, Size: 4707 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
  2010-07-11  9:16 ` eXeC001er
@ 2010-07-11 13:06   ` Boris Derzhavets
  0 siblings, 0 replies; 4+ messages in thread
From: Boris Derzhavets @ 2010-07-11 13:06 UTC (permalink / raw)
  To: eXeC001er; +Cc: Xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2893 bytes --]

Patching :-

diff -r c514d69c71d8 tools/python/xen/xend/XendBootloader.py
--- a/tools/python/xen/xend/XendBootloader.py    Fri Jun 04 11:39:06 2010 +0100
+++ b/tools/python/xen/xend/XendBootloader.py    Sun Jun 06 23:44:20 2010 +0400
@@ -38,10 +38,15 @@
         msg = "Bootloader isn't executable"
         log.error(msg)
         raise VmError(msg)
-    if not os.access(disk, os.R_OK):
-        msg = "Disk isn't accessible"
-        log.error(msg)
-        raise VmError(msg)
+    attempt = 0
+    while True:
+        if not os.access(disk, os.R_OK) and attempt > 3:
+            msg = "Disk isn't accessible"
+            log.error(msg)
+            raise VmError(msg)
+        else:
+            break
+        attempt = attempt + 1

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

Boris.

--- On 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" <bderzhavets@yahoo.com>
Cc: "Xen-devel" <xen-devel@lists.xensource.com>
Date: Sunday, July 11, 2010, 5:16 AM



2010/7/11 Boris Derzhavets <bderzhavets@yahoo.com>

After patching xen-unstable (changeset:   21769:a672af698bc3)
Rebuilt and reinstalled xen&tools.
Changed  "tap2:tapdisk:vhd" to "tap:vhd"

you can use:  "tap:vhd" or "tap:tapdisk:vhd"

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c  nexentastor-3.0.2-xen.cfg

Using config file "./nexentastor-3.0.2-xen.cfg".
root@ServerLSX:~/NexentaStor-Community-3.0.2# Error: Device 51952 not connected

root@ServerLSX:/usr/local/NexentaStor-Community-3.0.2# xm create -c  nexentastor-3.0.2-xen.cfg

Using 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.)
 

Boris.

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


From: eXeC001er
 <execooler@gmail.com>
Subject: [Xen-devel] [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)
To: "Xen-devel" <xen-devel@lists.xensource.com>

Date: Sunday, July 11, 2010, 4:16 AM

Current source-code work if use following configuration:config example:    disk=['tap:vhd:/path/../disk.img,xvda,w']




but not work if use:config example:    disk=['tap:tapdisk:vhd:/path/../disk.img,xvda,w']



Error during start DomU:    File 'vhd:/path/.../disk.img' doesn't exist.




this patch fix this bug.




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




Thanks.




-----Inline Attachment Follows-----

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










      




      

[-- Attachment #1.2: Type: text/html, Size: 7257 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-11 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-11  8:16 [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable) eXeC001er
  -- strict thread matches above, loose matches on Subject: below --
2010-07-11  8:57 Boris Derzhavets
2010-07-11  9:16 ` eXeC001er
2010-07-11 13:06   ` Boris Derzhavets

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).