Skip to contentSkip to conversation

Third release candidate for Xen 4.0.1

DISCUSSION Keir Fraser 4 participants 9 messages Jun 21, 2010 – Jul 12, 2010

lore
Share & tools
lore
#1 lore raw

CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory: 'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Boris

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#2 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"

Quoted 9 lines · Boris Derzhavets

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:
'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Cc one of the toolstack maintainers: Ian Jackson or Stefano.

-- Keir

Quoted 5 lines

Boris

#3 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"

Quoted 1 line

Cc one of the toolstack maintainers: Ian Jackson or Stefano

Done.

--- On Sat, 7/10/10, Keir Fraser <[email protected]> wrote:

From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"
To: "Boris Derzhavets" <[email protected]>, "[email protected]" <[email protected]>
Date: Saturday, July 10, 2010, 3:45 PM

Quoted 9 lines · Boris Derzhavets

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:
'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Cc one of the toolstack maintainers: Ian Jackson or Stefano.

-- Keir

Quoted 5 lines

Boris

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#4 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]

In reply to Boris Derzhavets

Boris Derzhavets writes ("[Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 1 line

In about the most recent 4-5 days an error :

This is related to 21541:7ff0e885b5c3 and 21728:51160a8ecf7d.

Quoted 5 lines
root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory: 'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Does this work in 4.0-testing ?

eXeC001er writes ("[Xen-devel] Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 4 lines

My patch was not quite correct. I waited until the return change back to make a new one.
The new patch will be ready today or tomorrow. Let's see how will the situation was.

Thanks. As I wrote earlier:

Can I ask you to try to (a) separate out these patches, and (b) explain the reasoning behind them in more detail ? If you can provide a separate message with a separate patch for each change, with an explanation at greater length, it will be much easier for us to evaluate them. Thanks.

Thanks,
Ian.

#5 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]

2010/7/12 Ian Jackson <[email protected]>

Quoted 7 lines

Boris Derzhavets writes ("[Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 1 line

In about the most recent 4-5 days an error :

This is related to 21541:7ff0e885b5c3 and 21728:51160a8ecf7d.

Quoted 1 line
root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
Quoted 9 lines

nexentastor-community-3.0.2-xen.cfg

Quoted 2 lines

Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:

'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

Quoted 2 lines

has been brought back under xen-unstable.

Does this work in 4.0-testing ?

No.

Quoted 8 lines

eXeC001er writes ("[Xen-devel] Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 4 lines

My patch was not quite correct. I waited until the return change back to make a new one.
The new patch will be ready today or tomorrow. Let's see how will the situation was.

Quoted 8 lines

Thanks. As I wrote earlier:

Can I ask you to try to (a) separate out these patches, and (b) explain the reasoning behind them in more detail ? If you can provide a separate message with a separate patch for each change, with an explanation at greater length, it will be much easier for us to evaluate them. Thanks.

I sent two patches:

1. [PATCH] blktap2: blktap2 and pygrub (xen-unstable)
2. [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)

Quoted 4 lines

Thanks,
Ian.

Thanks.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#6 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]

1. [PATCH] blktap2: blktap2 and pygrub (xen-unstable)

tools/python/xen/xend/XendDomainInfo.py    Sun Jul 11 17:16:39 2010 +0400 renamed from tools/python/xen/xend/XendDomainInfo.py    Fri Jul 09 12:35:58 2010 +0100 +0 -0
diff -r a672af698bc3 tools/python/xen/xend/XendDomainInfo.py
@@ -3261,6 +3261,7 @@


     taptype = blkdev_uname_to_taptype(disk)
     mounted = devtype in ['tap', 'tap2'] and taptype != 'aio' and taptype != 'sync' and not os.stat(fn).st_rdev +            mounted_vbd_uuid = 0
             if mounted:
                 # This is a file, not a device.  pygrub can cope with a

                 # file if it's raw, but if it's QCOW or other such formats
@@ -3276,7 +3277,8 @@
 
                 from xen.xend import XendDomain
                 dom0 = XendDomain.instance().privilegedDomain()
-                dom0._waitForDeviceUUID(dom0.create_vbd(vbd, disk))
+                mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
+                dom0._waitForDeviceUUID(mounted_vbd_uuid)
                 fn = BOOTLOADER_LOOPBACK_DEVICE
 
             try:
@@ -3286,8 +3288,9 @@
                 if mounted:
                     log.info("Unmounting %s from %s." %
                              (fn, BOOTLOADER_LOOPBACK_DEVICE))
-
-                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
+                    _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
+                    dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']), 
+                                       BOOTLOADER_LOOPBACK_DEVICE, force = True)
 
             if blcfg is None:
                 msg = "Had a bootloader specified, but can't find disk"

2.
[PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)

tools/python/xen/util/blkif.py    Sun Jul 11 12:13:34 2010 +0400 renamed from tools/python/xen/util/blkif.py    Fri Jul 09 12:35:58 2010 +0100 +0 -0
diff -r a672af698bc3 tools/python/xen/util/blkif.py
@@ -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):

I've tested this patches. They make things working for NexexentaStor 3.0.2 xen image with "vhd" files and pygrub as bootloader at Xen 4.1-unstable ( tip CS) & 2.6.32.16 Dom0 on top of Ubuntu 10.04 Server.

Per exeCooler :-

process of booting DomU with
'mounted-blktap2' (VHD for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'2. Pygrub get info for load DomU3. Disconnect boot-device from
Dom04. Boot DomU
During step 3
created device disconnecting from Dom0, but xenstore does
not scrape
away after device disconnected from Dom0 => result:

    "Error: Device /dev/xvdp (51952,
tap2) is already connected."

During step 3 created device disconnecting from
Dom0, but 'destroyDevice' method is passed 'tap' always => result:
 "Error: Device 51952 not connected"

Boris.
P.S. It's just a reminder of content been already posted by exeCooler to xen-devel mailing list.

--- On Mon, 7/12/10, eXeC001er <[email protected]> wrote:

From: eXeC001er <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]
To: "Ian Jackson" <[email protected]>
Cc: "[email protected]" <[email protected]>, "Boris Derzhavets" <[email protected]>, "Keir Fraser" <[email protected]>
Date: Monday, July 12, 2010, 1:08 PM

2010/7/12 Ian Jackson <[email protected]>

Boris Derzhavets writes ("[Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 1 line

In about the most recent 4-5 days an error :

This is related to 21541:7ff0e885b5c3 and 21728:51160a8ecf7d.

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

Using config file "./nexentastor-community-3.0.2-xen.cfg".

Error: [Errno 2] No such file or directory: 'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Does this work in 4.0-testing ?

No.

eXeC001er writes ("[Xen-devel] Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 7 lines

My patch was not quite correct. I waited until the return change back to

make a new one.

The new patch will be ready today or tomorrow. Let's see how will the

situation was.

Thanks.  As I wrote earlier:

 Can I ask you to try to (a) separate out these patches, and (b)

 explain the reasoning behind them in more detail ?  If you can

 provide a separate message with a separate patch for each change,

 with an explanation at greater length, it will be much easier for us

 to evaluate them.  Thanks.

I sent two patches:
1. [PATCH] blktap2: blktap2 and pygrub (xen-unstable)2. [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)

Thanks,

Ian.

Thanks.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#7 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]

In reply to Ian Jackson

1. [PATCH] blktap2: blktap2 and pygrub (xen-unstable)

tools/python/xen/xend/XendDomainInfo.py    Sun Jul 11 17:16:39 2010 +0400 renamed from tools/python/xen/xend/XendDomainInfo.py    Fri Jul 09 12:35:58 2010 +0100 +0 -0
diff -r a672af698bc3 tools/python/xen/xend/XendDomainInfo.py
@@ -3261,6 +3261,7 @@


     taptype = blkdev_uname_to_taptype(disk)
     mounted = devtype in ['tap', 'tap2'] and taptype != 'aio' and taptype != 'sync' and not os.stat(fn).st_rdev +            mounted_vbd_uuid = 0
             if mounted:
                 # This is a file, not a device.  pygrub can cope with a

                 # file if it's raw, but if it's QCOW or other such formats
@@ -3276,7 +3277,8 @@
 
                 from xen.xend import XendDomain
                 dom0 = XendDomain.instance().privilegedDomain()
-                dom0._waitForDeviceUUID(dom0.create_vbd(vbd, disk))
+                mounted_vbd_uuid = dom0.create_vbd(vbd, disk);
+                dom0._waitForDeviceUUID(mounted_vbd_uuid)
                 fn = BOOTLOADER_LOOPBACK_DEVICE
 
             try:
@@ -3286,8 +3288,9 @@
                 if mounted:
                     log.info("Unmounting %s from %s." %
                              (fn, BOOTLOADER_LOOPBACK_DEVICE))
-
-                    dom0.destroyDevice('tap', BOOTLOADER_LOOPBACK_DEVICE)
+                    _, vbd_info = dom0.info['devices'][mounted_vbd_uuid]
+                    dom0.destroyDevice(dom0.getBlockDeviceClass(vbd_info['devid']),
+                                       BOOTLOADER_LOOPBACK_DEVICE, force = True)
 
             if blcfg is None:
                 msg = "Had a bootloader specified, but can't find disk"

2. [PATCH] blktap/blktap2: Fix for incorrect parse disk configuration (xen-unstable)

tools/python/xen/util/blkif.py    Sun Jul 11 12:13:34 2010 +0400 renamed from tools/python/xen/util/blkif.py    Fri Jul 09 12:35:58 2010 +0100 +0 -0
diff -r a672af698bc3 tools/python/xen/util/blkif.py
@@ -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):

I've tested this patches. They make things working for NexexentaStor 3.0.2 xen image with "vhd" files and pygrub as bootloader at Xen 4.1-unstable ( tip CS) & 2.6.32.16 Dom0 on top of Ubuntu 10.04 Server.

Per exeCooler :-

process of booting DomU with 'mounted-blktap2' (VHD for example) and 'pygrub' as bootloader:

1. Connect boot-device to Dom0 as '/dev/xpvd'
2. Pygrub get info for load DomU
3. Disconnect boot-device from Dom0
4. Boot DomU

During step 3 created device disconnecting from Dom0, but xenstore does not scrape away after device disconnected from Dom0 => result:
    "Error: Device /dev/xvdp (51952, tap2) is already connected."

During step 3 created device disconnecting from Dom0, but 'destroyDevice' method is passed 'tap' always => result:
    "Error: Device 51952 not connected"

Boris.
P.S. It's just a reminder of content been already posted by exeCooler to xen-devel mailing list.

--- On Mon, 7/12/10, Ian Jackson <[email protected]> wrote:

From: Ian Jackson <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" [and 1 more messages]
To: "eXeC001er" <[email protected]>
Cc: "[email protected]" <[email protected]>, "Boris Derzhavets" <[email protected]>, "Keir Fraser" <[email protected]>
Date: Monday, July 12, 2010, 1:01 PM

Boris Derzhavets writes ("[Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 1 line

In about the most recent 4-5 days an error :

This is related to 21541:7ff0e885b5c3 and 21728:51160a8ecf7d.

Quoted 5 lines
root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory: 'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Does this work in 4.0-testing ?

eXeC001er writes ("[Xen-devel] Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd""):

Quoted 4 lines

My patch was not quite correct. I waited until the return change back to make a new one.
The new patch will be ready today or tomorrow. Let's see how will the situation was.

Thanks.  As I wrote earlier:

  Can I ask you to try to (a) separate out these patches, and (b) explain the reasoning behind them in more detail ?  If you can provide a separate message with a separate patch for each change, with an explanation at greater length, it will be much easier for us to evaluate them.  Thanks.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#8 lore raw

Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"

1. CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer

Quoted 114 lines

working for "vhd" (Boris Derzhavets)
2. Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" (Keir Fraser)
3. Re: CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd" (Boris Derzhavets)

Message: 1
Date: Sat, 10 Jul 2010 12:35:27 -0700 (PDT)
From: Boris Derzhavets <[email protected]>
Subject: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues)
is no longer working for "vhd"
To: "[email protected]" <[email protected]>,
Keir Fraser <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:
'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Boris

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.xensource.com/archives/html/xen-devel/attachments/20100710/ee9c7bec/attachment.html

------------------------------

Message: 2
Date: Sat, 10 Jul 2010 20:45:11 +0100
From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype
issues) is no longer working for "vhd"
To: Boris Derzhavets <[email protected]>,
"[email protected]" <[email protected]>
Message-ID: <C85E8C57.1A4FD%[email protected]<C85E8C57.1A4FD%[email protected]>

Quoted 1 line

Content-Type: text/plain; charset="US-ASCII"

Quoted 9 lines · Boris Derzhavets

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:
'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'

has been brought back under xen-unstable.

Cc one of the toolstack maintainers: Ian Jackson or Stefano.

-- Keir

Quoted 5 lines

Boris

------------------------------

Message: 3
Date: Sat, 10 Jul 2010 12:59:37 -0700 (PDT)
From: Boris Derzhavets <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype
issues) is no longer working for "vhd"
To: "[email protected]" <[email protected]>,
Keir Fraser <[email protected]>
Cc: Ian Jackson <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset="iso-8859-1"

Quoted 1 line

Cc one of the toolstack maintainers: Ian Jackson or Stefano

Done.

--- On Sat, 7/10/10, Keir Fraser <[email protected]> wrote:

From: Keir Fraser <[email protected]>
Subject: Re: [Xen-devel] CS 21556 (blktap2: Fix tapdisk disktype issues) is no longer working for "vhd"
To: "Boris Derzhavets" <[email protected]>, " [email protected]" <[email protected]>
Date: Saturday, July 10, 2010, 3:45 PM

Quoted 8 lines · Boris Derzhavets

In about the most recent 4-5 days an error :

root@ServerLSX:~/NexentaStor-Community-3.0.2# xm create -c
nexentastor-community-3.0.2-xen.cfg
Using config file "./nexentastor-community-3.0.2-xen.cfg".
Error: [Errno 2] No such file or directory:
'vhd:/root/NexentaStor-Community-3.0.2/syspool.img'
Quoted 13 lines
Quoted 1 line

has been brought back under xen-unstable.

Cc one of the toolstack maintainers: Ian Jackson or Stefano.

-- Keir

Quoted 5 lines

Boris

My patch was not quite correct. I waited until the return change back to make a new one.
The new patch will be ready today or tomorrow. Let's see how will the situation was.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel