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] xend: Fix xm scsi-attach for host OS with

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix xm scsi-attach for host OS without lsscsi
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 13 Mar 2009 00:50:11 -0700
Delivery-date: Fri, 13 Mar 2009 00:50:36 -0700
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 1236929927 0
# Node ID f97e737373cdf06726042e7b2732d33cb0a2ba38
# Parent  3c1a88dc6fbea03d4cbba5101f3ffcfcc065f3e9
xend: Fix xm scsi-attach for host OS without lsscsi

In the case of a host OS without lsscsi command, xm scsi-attach
command fails even if you specify existing SCSI device.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/util/vscsi_util.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -r 3c1a88dc6fbe -r f97e737373cd tools/python/xen/util/vscsi_util.py
--- a/tools/python/xen/util/vscsi_util.py       Fri Mar 13 07:38:05 2009 +0000
+++ b/tools/python/xen/util/vscsi_util.py       Fri Mar 13 07:38:47 2009 +0000
@@ -152,7 +152,9 @@ def vscsi_get_hctl_and_devname_by(target
         elif target.startswith('/dev/'): 
             scsi_devices = _vscsi_get_scsidevices_by_lsscsi("| grep %s" % 
target)
         else:
-            scsi_devices = vscsi_get_scsidevices()
+            scsi_devices = _vscsi_get_scsidevices_by_lsscsi("")
+        if not scsi_devices:
+            scsi_devices = _vscsi_get_scsidevices_by_sysfs()
 
     if len(target.split(':')) == 4:
         return _vscsi_get_devname_by(target, scsi_devices)

_______________________________________________
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] xend: Fix xm scsi-attach for host OS without lsscsi, Xen patchbot-unstable <=