aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author"Dube, Lutz" <lutz.dube@ts.fujitsu.com>2010-08-11 13:18:05 +0100
committer"Dube, Lutz" <lutz.dube@ts.fujitsu.com>2010-08-11 13:18:05 +0100
commitbb3bac1c3b5daaf54cc6ef2869c75488e48d6e7e (patch)
treeed8ed696c31d16c1f96a1f3b5c46100118b00937
parent044f08997b983830dcba26a1f91cff1b9d63f013 (diff)
downloadxen-bb3bac1c3b5daaf54cc6ef2869c75488e48d6e7e.tar.gz
xen-bb3bac1c3b5daaf54cc6ef2869c75488e48d6e7e.tar.bz2
xen-bb3bac1c3b5daaf54cc6ef2869c75488e48d6e7e.zip
Exception in xen/util/vscsi_util.py while starting xend
  We have pscsi device with long scsi ids like 15:0:11:101. In this case lsscsi prints no "blank" between id and type, so the following split of the string returns wrong output. The field physical_HCTL is set to 15:0:11:101]dis. The patch replaces char "]" by "] ", so split() will return the right physical_HTCL. Signed-off-by: Lutz Dube Lutz.Dube@ts.fujitsu.com Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r--tools/python/xen/util/vscsi_util.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/util/vscsi_util.py b/tools/python/xen/util/vscsi_util.py
index 8d5351f4fd..9abf66b84b 100644
--- a/tools/python/xen/util/vscsi_util.py
+++ b/tools/python/xen/util/vscsi_util.py
@@ -97,7 +97,7 @@ def _vscsi_get_scsidevices_by_lsscsi(option = ""):
devices = []
for scsiinfo in os.popen('{ lsscsi -g %s; } 2>/dev/null' % option).readlines():
- s = scsiinfo.split()
+        s = scsiinfo.replace(']', '] ').split()
hctl = s[0][1:-1]
try:
devname = s[-2].split('/dev/')[1]