Re: OSError: [Errno 20] Not a directory: '.../tag'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/27/2013 06:32 AM, Michael Ziegler wrote:
I'm getting an error when I (or something else) call _list_mapped_luns():

lun
<rtslib.target.LUN object at 0x289a610>
lun._list_mapped_luns()
Traceback (most recent call last): File "<console>", line 1, in
<module> File "/usr/lib/python2.7/dist-packages/rtslib/target.py",
line 491, in _list_mapped_luns % (base, nodeacl, mapped_lun))
OSError: [Errno 20] Not a directory:
'/sys/kernel/config/target/iscsi/iqn.2003-01.org.linux-iscsi.srvliotest01.x8664:ultratest/tpgt_8/acls//iqn.1991-05.com.microsoft:mziegler-win7.master.dns/tag'

The

message is correct in the sense that ".../tag" is a file, so I
guess the listdir() call in target.py is what's causing this.

The following patch seems to help:

- --- /tmp/target.py      2013-06-27 15:27:15.907882739 +0200
+++ /usr/share/pyshared/rtslib/target.py        2013-06-27
15:27:01.315882937 +0200
@@ -482,7 +482,7 @@
              return []
          else:
              base = "%s/acls/" % tpg.path
- -            xmlun = ["param", "info", "cmdsn_depth", "auth", "attrib"]
+            xmlun = ["param", "info", "cmdsn_depth", "auth",
"attrib", "tag"]
              return [MappedLUN(NodeACL(tpg, nodeacl),
mapped_lun.split('_')[1])
                      for nodeacl in listdir(base)
                      for mapped_lun in listdir("%s/%s" % (base, nodeacl))

Cheers,
Michael

Hi Michael,

What distro are you using? This bug was fixed two years ago, you need a newer rtslib.

-- Andy

--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux