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] Exception in xen/util/vscsi_util.py while starting xend

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Exception in xen/util/vscsi_util.py while starting xend
From: "Dube, Lutz" <lutz.dube@xxxxxxxxxxxxxx>
Date: Wed, 21 Jul 2010 13:28:57 +0200
Accept-language: de-DE, en-US
Acceptlanguage: de-DE, en-US
Delivery-date: Wed, 21 Jul 2010 04:31:38 -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=1279711892; x=1311247892; 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:=20Wed,=2021=20Jul=202010=2013:28:57=20+ 0200|Subject:=20Exception=20in=20xen/util/vscsi_util.py =20while=20starting=20xend|Message-ID:=20<3958B14F314B884 890EEE2F4CCDAB6A601122BD5698F@xxxxxxxxxxxxxxxx> |MIME-Version:=201.0; bh=2gJVnhsxp75yoUxuyT/dsUjLFJODwSpC9E78YPiJM/I=; b=sGQTedYiahtCQKOCclWpXBzS+AThdDZn9P8CuPCkjd/rqa6WH+1IHvdR kbNxt2vwNfHhZ8b1CQLW1vFxk4Vq89gdP2e3Dx8bzlE/sCg6v66PWiyaO 9c7bX4BH4owMByCnF2aj8w4DU803uRnqSECtYaRE81ckBW8P/n70msq7Q nTqQJepfDFALLQoG6KnL+a0ttP0P9DvfXBFtq2z2wmpKpIubF3wWU2YxV r9aAozCxPrvXO2oi6ndpXQgfJrMYr;
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=cpNKJk3xXgv218V/TyjnSSwyBFXwxTGa0EvJF3gfU5cmEyUlM/+buHWG VF6dTqqbYnuJe2JGlDCJmfFeQqml/gVMUF+QF6I55x1FuD7PpcKCInqHa X0vZU89mzrSE0ChdFqtThSX+CZBTu5Bqrgeuc14yip79FV5TGZe/3yPjV YsLWQmiy8XHt4jlYrRrtkpMurv2Gv5Ep/oP79+1WzSBuvIzE+CDdQ/kaX jdKM27y0cle/qFjUzU8wSw1w4BEBJ;
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: Acsox+h0Ac/ckLbNQNC5Fme3z8ruGQ==
Thread-topic: 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>
  • [Xen-devel] Exception in xen/util/vscsi_util.py while starting xend, Dube, Lutz <=