[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: Fix xm scsi-attach for host OS without lsscsi



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.