WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] xm: Fix xm block-list for inactive manage

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xm: Fix xm block-list for inactive managed domains
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 06 Dec 2008 04:20:22 -0800
Delivery-date: Sat, 06 Dec 2008 04:22:01 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228390363 0
# Node ID 1099be706d4e1ed971e1316ab4303fae274af26d
# Parent  63aa939c114cf88d400514a04d69165cff64759d
xm: Fix xm block-list for inactive managed domains

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletion(-)

diff -r 63aa939c114c -r 1099be706d4e tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Thu Dec 04 11:31:37 2008 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Dec 04 11:32:43 2008 +0000
@@ -1018,7 +1018,8 @@ class XendDomainInfo:
             sxprs = []
             dev_num = 0
             for dev_type, dev_info in self.info.all_devices_sxpr():
-                if dev_type != deviceClass:
+                if (deviceClass == 'vbd' and dev_type not in ['vbd', 'tap']) 
or \
+                   (deviceClass != 'vbd' and dev_type != deviceClass):
                     continue
 
                 if deviceClass == 'vscsi':
@@ -1028,6 +1029,16 @@ class XendDomainInfo:
                         vscsi_devs[1].append(vscsi_dev)
                         dev_num = int(sxp.child_value(vscsi_dev, 'devid'))
                     sxprs.append([dev_num, [vscsi_devs]])
+                elif deviceClass == 'vbd':
+                    dev = sxp.child_value(dev_info, 'dev')
+                    if 'ioemu:' in dev:
+                        (_, dev) = dev.split(':', 1)
+                    try:
+                        (dev_name, _) = dev.split(':', 1)  # Remove ":disk" or 
":cdrom"
+                    except ValueError:
+                        dev_name = dev
+                    dev_num = 
self.getDeviceController('vbd').convertToDeviceNumber(dev_name)
+                    sxprs.append([dev_num, dev_info])
                 else:
                     sxprs.append([dev_num, dev_info])
                     dev_num += 1

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xm: Fix xm block-list for inactive managed domains, Xen patchbot-unstable <=