Exception in xen/util/vscsi_util.py while starting xend
PATCH 1/1 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'
tools/python/xen/util/vscsi_util.py Wed Jul 21 13:15:33 2010 +0200 renamed from tools/python/xen/util/vscsi_util.py Wed Jul 21 09:02:10 2010 +0100 +1 -1
@@ -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 [email protected]
Internet: http://ts.fujitsu.com<http://ts.fujitsu.com/>
Firmenangaben: http://de.ts.fujitsu.com/imprint.html
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Dube, Lutz writes ("[Xen-devel] [PATCH] Exception in xen/util/vscsi_util.py while starting xend"):
Quoted 3 lines
The field
physical_HCTLis set to 15:0:11:101]dis.
The patch replaces char "]" by "] ", sosplit()will return the rightphysical_HTCL.
Urgh, this shows, I think, that the existing code is pretty unpleasant. Really we should be using some tool with a sane output format. However, I think this is an OK workaround, so:
Have you given any thought to support for these features in xl and libxl ?
Ian.
Dube, Lutz
Acked-by Ian JacksonHi Ian,
xl and libxl are great tools and I think these tools should support the same devices as xm/xend, so in future xl can replace xm without any loss of functionality (except managed domains).
But currently my work is already focused on xen-4.0 and xm/xend.
Lutz
-----Original Message-----
From: Ian Jackson [mailto:[email protected]]
Sent: Tuesday, August 10, 2010 6:50 PM
To: Dube, Lutz
Cc: [email protected]
Subject: Re: [Xen-devel] [PATCH] Exception in xen/util/vscsi_util.py while starting xend
Dube, Lutz writes ("[Xen-devel] [PATCH] Exception in xen/util/vscsi_util.py while starting xend"):
Quoted 3 lines
The field
physical_HCTLis set to 15:0:11:101]dis.
The patch replaces char "]" by "] ", sosplit()will return the rightphysical_HTCL.
Urgh, this shows, I think, that the existing code is pretty unpleasant. Really we should be using some tool with a sane output format. However, I think this is an OK workaround, so:
Have you given any thought to support for these features in xl and libxl ?
Ian.