|  |  | 
  
    |  |  | 
 
  |   |  | 
  
    |  |  | 
  
    |  |  | 
  
    |   xen-bugs
[Xen-bugs] XCP small issue in ISCSISR 
| Hello Everyone,
There is a small issue in ISCSISR.py from XCP 0.5.
In _attach_LUN_bylunid (sorry I don't have the correct line numbers since I 
modified this file a lot):
if not self.devs.has_key(realpath):
                host = self.adapter[val]
else:
                # Verify that we are not seeing a stale LUN map
                try:
                    real_SCSIid = scsiutil.getSCSIid(realpath)
                    cur_scsibuspath = 
glob.glob('/dev/disk/by-scsibus/*-%s:0:0:%s' % (host,lunid))
                    cur_SCSIid = 
os.path.basename(cur_scsibuspath[0]).split("-")[0]
                    assert(cur_SCSIid == real_SCSIid)
                except:
                    scsiutil.rescan([host])
The "host" variable is defined above, but not before the if condition and can't 
be used further on the "else" branch since it's not defined.
I reached this exception during my tests (no lunid present in sm_config).
Best regards,
Tomoiaga Cristian
_______________________________________________
Xen-bugs mailing list
Xen-bugs@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-bugs
 | 
 
| <Prev in Thread] | Current Thread | [Next in Thread> |  | 
[Xen-bugs] XCP small issue in ISCSISR,
Tomoiaga Cristian <=
 |  |  | 
  
    |  |  |