Package: xcp-storage-managers
Version: 0.1.1-2ubuntu1
Severity: normal

This bug prevents CDROM VDIs from being hotplugged into guest
VMs. The issue is that the NFS ISO SR configures the ISO VDIs to
be 'file' types, which it should configure them to by 'phy'
types. This breaks on Debian's Xen because the Debian hotplug
scripts are more robuse than the ones on XenServer, and fail
because the VDI type is set improperly.

A debdiff is attached.



-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500,
'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.0-30-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xcp-storage-managers depends on:
ii  blktap-utils    2.0.90-1
ii  libc6           2.15-0ubuntu10
ii  libxenstore3.0  4.1.2-2ubuntu2.2
ii  python          2.7.3-0ubuntu2
ii  python2.7       2.7.3-0ubuntu3.1
ii  uuid-runtime    2.20.1-1ubuntu3

Versions of packages xcp-storage-managers recommends:
ii  lvm2        2.02.66-4ubuntu7.1
ii  nfs-common  1:1.2.5-3ubuntu3

xcp-storage-managers suggests no packages.

-- no debconf information
diff -Nru xcp-storage-managers-0.1.1/debian/changelog 
xcp-storage-managers-0.1.1/debian/changelog
--- xcp-storage-managers-0.1.1/debian/changelog 2011-12-17 16:47:38.000000000 
+0000
+++ xcp-storage-managers-0.1.1/debian/changelog 2012-09-04 11:15:29.000000000 
+0100
@@ -1,3 +1,9 @@
+xcp-storage-managers (0.1.1-3) unstable; urgency=low
+
+  * Fix CDROM guest hotplug bug (LP: #1045739)
+
+ -- Mike McClurg <mike.mccl...@citrix.com>  Tue, 04 Sep 2012 11:03:11 +0100
+
 xcp-storage-managers (0.1.1-2) unstable; urgency=low
 
   * New FHS compliant layout
diff -Nru xcp-storage-managers-0.1.1/debian/patches/0002-lvm2-path.patch 
xcp-storage-managers-0.1.1/debian/patches/0002-lvm2-path.patch
--- xcp-storage-managers-0.1.1/debian/patches/0002-lvm2-path.patch      
2011-12-17 16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/0002-lvm2-path.patch      
2012-09-04 11:15:29.000000000 +0100
@@ -4,7 +4,7 @@
 
 ---
  drivers/lvutil.py |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/lvutil.py b/drivers/lvutil.py
 index e9bf30a..a6c9914 100755
diff -Nru xcp-storage-managers-0.1.1/debian/patches/0003-fpic-on-xslib.patch 
xcp-storage-managers-0.1.1/debian/patches/0003-fpic-on-xslib.patch
--- xcp-storage-managers-0.1.1/debian/patches/0003-fpic-on-xslib.patch  
2011-12-17 16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/0003-fpic-on-xslib.patch  
2012-09-04 11:15:29.000000000 +0100
@@ -4,7 +4,7 @@
 
 ---
  snapwatchd/Makefile |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/snapwatchd/Makefile b/snapwatchd/Makefile
 index 98cb1a9..addcbfb 100644
diff -Nru xcp-storage-managers-0.1.1/debian/patches/0004-remove-xencert.patch 
xcp-storage-managers-0.1.1/debian/patches/0004-remove-xencert.patch
--- xcp-storage-managers-0.1.1/debian/patches/0004-remove-xencert.patch 
2011-12-17 16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/0004-remove-xencert.patch 
2012-09-04 11:15:29.000000000 +0100
@@ -4,7 +4,7 @@
 
 ---
  Makefile |    1 -
- 1 files changed, 0 insertions(+), 1 deletions(-)
+ 1 file changed, 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
 index a42b056..a1ff8c5 100644
diff -Nru xcp-storage-managers-0.1.1/debian/patches/0005-vhd-util-path.patch 
xcp-storage-managers-0.1.1/debian/patches/0005-vhd-util-path.patch
--- xcp-storage-managers-0.1.1/debian/patches/0005-vhd-util-path.patch  
2011-12-17 16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/0005-vhd-util-path.patch  
2012-09-04 11:15:29.000000000 +0100
@@ -4,7 +4,7 @@
 
 ---
  drivers/vhdutil.py |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ 1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/vhdutil.py b/drivers/vhdutil.py
 index 10b6994..6ddcd32 100644
diff -Nru 
xcp-storage-managers-0.1.1/debian/patches/0006-fix-local-device-change.patch 
xcp-storage-managers-0.1.1/debian/patches/0006-fix-local-device-change.patch
--- 
xcp-storage-managers-0.1.1/debian/patches/0006-fix-local-device-change.patch    
    2011-12-17 16:47:38.000000000 +0000
+++ 
xcp-storage-managers-0.1.1/debian/patches/0006-fix-local-device-change.patch    
    2012-09-04 11:15:29.000000000 +0100
@@ -6,7 +6,7 @@
 # Parent 48aa86a502ee5df1519d3ea42528c77d8fcf9ff6
 ---
  scripts/local-device-change |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/scripts/local-device-change b/scripts/local-device-change
 index 57fec20..2929bf1 100755
diff -Nru 
xcp-storage-managers-0.1.1/debian/patches/0008-remove-primary-disk-dependency.patch
 
xcp-storage-managers-0.1.1/debian/patches/0008-remove-primary-disk-dependency.patch
--- 
xcp-storage-managers-0.1.1/debian/patches/0008-remove-primary-disk-dependency.patch
 2011-12-17 16:47:38.000000000 +0000
+++ 
xcp-storage-managers-0.1.1/debian/patches/0008-remove-primary-disk-dependency.patch
 2012-09-04 11:15:29.000000000 +0100
@@ -4,7 +4,7 @@
 
 ---
  drivers/util.py |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
+ 1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/util.py b/drivers/util.py
 index 54b99ac..bf1f8ab 100644
diff -Nru 
xcp-storage-managers-0.1.1/debian/patches/0009-disable-block-SRs.patch 
xcp-storage-managers-0.1.1/debian/patches/0009-disable-block-SRs.patch
--- xcp-storage-managers-0.1.1/debian/patches/0009-disable-block-SRs.patch      
2011-12-17 16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/0009-disable-block-SRs.patch      
2012-09-04 11:15:29.000000000 +0100
@@ -8,12 +8,14 @@
 
 Signed-off-by: Mike McClurg <mike.mccl...@citrix.com>
 ---
- Makefile |    4 +++-
- 1 files changed, 3 insertions(+), 1 deletions(-)
+ Makefile |   12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
 
+diff --git a/Makefile b/Makefile
+index fbfbbf5..4255016 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -12,6 +12,8 @@
+@@ -12,6 +12,8 @@ SM_DRIVERS += LVHDoISCSI
  SM_DRIVERS += LVHDoHBA
  SM_DRIVERS += SHM
  
@@ -22,7 +24,7 @@
  SM_LIBS := SR
  SM_LIBS += SRCommand
  SM_LIBS += VDI
-@@ -93,13 +95,13 @@
+@@ -93,13 +95,13 @@ install:
        for i in $(SM_XML); do \
          install -m 755 drivers/$$i.xml \
            $(SM_STAGING)$(SM_DEST); done
@@ -41,3 +43,4 @@
        #ln -sf $(SM_DEST)mpathutil.py $(SM_STAGING)/sbin/mpathutil
        install -m 755 drivers/02-vhdcleanup $(SM_STAGING)$(MASTER_SCRIPT_DEST)
        install -m 755 drivers/lvhd-thin $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
+-- 
diff -Nru 
xcp-storage-managers-0.1.1/debian/patches/0010-Fix-guest-CDROM-hotplug.patch 
xcp-storage-managers-0.1.1/debian/patches/0010-Fix-guest-CDROM-hotplug.patch
--- 
xcp-storage-managers-0.1.1/debian/patches/0010-Fix-guest-CDROM-hotplug.patch    
    1970-01-01 01:00:00.000000000 +0100
+++ 
xcp-storage-managers-0.1.1/debian/patches/0010-Fix-guest-CDROM-hotplug.patch    
    2012-09-04 11:15:29.000000000 +0100
@@ -0,0 +1,30 @@
+From: Mike McClurg <mike.mccl...@citrix.com>
+Date: Tue, 4 Sep 2012 10:57:09 +0100
+Subject: Fix guest CDROM hotplug
+
+The ISOSR driver erroneously tagged all ISO VDIs as 'file' types when it should
+have tagged them as 'phy' types. The XenServer hotplug scripts are quite
+simple, and don't distinguish between these two types. The upstream Xen 4.1
+hotplug scripts, however, are quite robust, and would refuse to plug the CDROM
+devices into the guest because the backend paths that contained the CDROM
+images were block devices and not files.
+
+Signed-off-by: Mike McClurg <mike.mccl...@citrix.com>
+---
+ drivers/ISOSR.py |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/ISOSR.py b/drivers/ISOSR.py
+index 35601ed..c1e3004 100755
+--- a/drivers/ISOSR.py
++++ b/drivers/ISOSR.py
+@@ -191,7 +191,7 @@ class ISOSR(SR.SR):
+             self.path = self.mountpoint
+ 
+         # Some info we need:
+-        self.sr_vditype = 'file'
++        self.sr_vditype = 'phy'
+         self.credentials = None
+  
+     def attach(self, sr_uuid):
+-- 
diff -Nru xcp-storage-managers-0.1.1/debian/patches/series 
xcp-storage-managers-0.1.1/debian/patches/series
--- xcp-storage-managers-0.1.1/debian/patches/series    2011-12-17 
16:47:38.000000000 +0000
+++ xcp-storage-managers-0.1.1/debian/patches/series    2012-09-04 
11:15:29.000000000 +0100
@@ -7,3 +7,4 @@
 0007-fix-makefile.patch
 0008-remove-primary-disk-dependency.patch
 0009-disable-block-SRs.patch
+0010-Fix-guest-CDROM-hotplug.patch
Binary files /tmp/TeCi_EcImJ/xcp-storage-managers-0.1.1/XenCert/diskdatatest 
and /tmp/rnkmYxDgKR/xcp-storage-managers-0.1.1/XenCert/diskdatatest differ

Reply via email to