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-devel

[Xen-devel] [PATCH] Exception in xen/util/vscsi_util.py while starting x

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Exception in xen/util/vscsi_util.py while starting xend
From: "Dube, Lutz" <lutz.dube@xxxxxxxxxxxxxx>
Date: Tue, 10 Aug 2010 11:08:28 +0200
Accept-language: de-DE, en-US
Acceptlanguage: de-DE, en-US
Delivery-date: Tue, 10 Aug 2010 02:10:22 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=lutz.dube@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1281431307; x=1312967307; h=from:to:date:subject:message-id:mime-version; z=From:=20"Dube,=20Lutz"=20<lutz.dube@xxxxxxxxxxxxxx>|To: =20"xen-devel@xxxxxxxxxxxxxxxxxxx"=20<xen-devel@xxxxxxxxx source.com>|Date:=20Tue,=2010=20Aug=202010=2011:08:28=20+ 0200|Subject:=20[PATCH]=20Exception=20in=20xen/util/vscsi _util.py=20while=20starting=20xend|Message-ID:=20<3958B14 F314B884890EEE2F4CCDAB6A601122BF3FD5B@xxxxxxxxxxxxxxxx> |MIME-Version:=201.0; bh=qOmIrLSQuX0UDY8hnwswEhBcF8lxLWkJSV5S1hXn4f0=; b=sFEJ54T4+5tqUF+CY6/wvrfEap3aQVIRIef/vv2DMAcrGZzE9O1T6tDm /TsSNU/9T3DC3DgvL0eLa8q1W9WxrdUfckHMgEAGvt0CWO/vlA/x9Cckd ez24uYNydD/p1OTuY968iPDBaLisDtTOsKg2zkY/WaLhdJJsREoD2TDG/ Xr2w1zUgKgz7z07+05/On27lXspB4EjqWHpw3LlM/e9wiMR8roWfRXL+r mZD6lQL1QojLSR9p15T5zvZzsIstP;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:Received:From:To:Date: Subject:Thread-Topic:Thread-Index:Message-ID: Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:acceptlanguage:Content-Type: MIME-Version; b=Lw3amtpLs8ORw/wyXv1eK3N6kUicTYYKNuLs2PwA7+b2j1SdDqOak3VM MIKetqr1EAsij3Bkf+hc10HBixLXWsGZt2ZNDnzOZnjP2CJ+LGGxLxu1n q2gzDCnaOJSXqxxKnUYP5irXLHq9aguq0COKlKytDANDmODo6i99mbtBa 0rNXcsI6H0NnGikgk4LLIfwqKsJgotbdtkwIekiFeAtbSPWobrz+Qn8Ab 7ecAa1zDTi/AN4w+ZHXg5Ry/QZlRB;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acs4a5iEMrKws3DBRj6uJovau8tMng==
Thread-topic: [PATCH] Exception in xen/util/vscsi_util.py while starting xend
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 (see example),
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.
 
[15:0:11:101]disk    DGC      RAID 10          0429  /dev/xsdmdr
 
Snippet from Xend.log:
[2010-07-21 12:35:03 14959] ERROR (SrvDaemon:349) Exception starting xend (invalid literal for int() with base 10: '215]dis')
Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvDaemon.py", line 341, in run
    servers = SrvServer.create()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvServer.py", line 261, in create
    root.putChild('xend', SrvRoot())
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvRoot.py", line 40, in __init__
    self.get(name)
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 84, in get
    val = val.getobj()
  File "/usr/lib64/python2.6/site-packages/xen/web/SrvDir.py", line 52, in getobj
    self.obj = klassobj()
  File "/usr/lib64/python2.6/site-packages/xen/xend/server/SrvNode.py", line 30, in __init__
    self.xn = XendNode.instance()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 1196, in instance
    inst = XendNode()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 161, in __init__
     self._init_PSCSIs()
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendNode.py", line 367, in _init_PSCSIs
     XendPSCSI(pscsi_uuid, pscsi_record)
  File "/usr/lib64/python2.6/site-packages/xen/xend/XendPSCSI.py", line 96, in __init__
     self.physical_lun = int(p_hctl[3])
  ValueError: invalid literal for int() with base 10: '215]dis'
 
Signed-off-by: Lutz Dube Lutz.Dube@xxxxxxxxxxxxxx
 
 
diff -r e8dbc1262f52 -r fac9d58d3c8a tools/python/xen/util/vscsi_util.py
--- a/tools/python/xen/util/vscsi_util.py       Wed Jul 21 09:02:10 2010 +0100
+++ b/tools/python/xen/util/vscsi_util.py       Wed Jul 21 13:15:33 2010 +0200
@@ -97,7 +97,7 @@
     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]
 
---
Best regards
 
Lutz Dube
Softwareentwickler
TSP ES&S SWE OS7
 
FUJITSU TECHNOLOGY SOLUTIONS GMBH
Domagkstr. 28
D-80807 München
 
Telefon:        +49 (0)89 3222 2688
Telefax:        +49 (0)89 3222 329 2688
Email:          Lutz Dube@xxxxxxxxxxxxxx
 
Internet:        http://ts.fujitsu.com
 
 
 
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>