On Tuesday 30 July 2013 01:56 PM, Raoul Bhatia [IPAX] wrote:
> Package: targetcli
> Version: 2.0rc1-2
> Severity: normal
>
>
> my config (a little obfuscated because of privacy concerns):
>> # targetcli
>> Welcome to the targetcli shell:
>>
>>  Copyright (c) 2011 by RisingTide Systems LLC.
>>
>> Visit us at http://www.risingtidesystems.com.
>>
>> Using ib_srpt fabric module.
>> Using qla2xxx fabric module.
>> Using iscsi fabric module.
>> Using loopback fabric module.
>> Using tcm_fc fabric module.
>> /iscsi/iqn.20...7c/tpgt1/luns> ls /
>> o- /
>> .........................................................................................................................
>> [...]
>>   o- backstores
>> ..............................................................................................................
>> [...]
>>   | o- fileio
>> ..................................................................................................
>> [3 Storage Objects]
>>   | | o- kxxxxxxvsa
>> ....................................................
>> [/data/customers/kxxxxxx/kxxxxxxvsa/backup.iscsi activated]
>>   | | o- kyyyyyyvsd
>> ....................................................
>> [/data/customers/kyyyyyy/kyyyyyyvsd/backup.iscsi activated]
>>   | | o- test
>> .......................................................................
>> [/data/customers/kxxxxxx/test.iscsi activated]
>>   | o- iblock
>> ...................................................................................................
>> [0 Storage Object]
>>   | o- pscsi
>> ....................................................................................................
>> [0 Storage Object]
>>   | o- rd_dr
>> ....................................................................................................
>> [0 Storage Object]
>>   | o- rd_mcp
>> ...................................................................................................
>> [0 Storage Object]
>>   o- ib_srpt
>> ............................................................................................................
>> [0 Target]
>>   o- iscsi
>> ..............................................................................................................
>> [1 Target]
>>   | o- iqn.2003-01.org.linux-iscsi.server01.x8664:sn.083f7c9e8233
>> .......................................................... [1 TPG]
>>   |   o- tpgt1
>> ...........................................................................................................
>> [enabled]
>>   |     o- acls
>> ...........................................................................................................
>> [3 ACLs]
>>   |     | o- iqn.1991-05.com.microsoft:kxxxxxxvsa.aaaaaaaaa.local
>> ................................................... [1 Mapped LUN]
>>   |     | | o- mapped_lun2
>> .............................................................................................
>> [lun2 (rw)]
>>   |     | o- iqn.1991-05.com.microsoft:kyyyyyyvsd
>> ...................................................................
>> [1 Mapped LUN]
>>   |     | | o- mapped_lun1
>> .............................................................................................
>> [lun1 (rw)]
>>   |     | o- iqn.1993-08.org.debian:01:6abdf44cfb2
>> .................................................................. [0
>> Mapped LUN]
>>   |     o- luns
>> ...........................................................................................................
>> [3 LUNs]
>>   |     | o- lun0
>> ...............................................................
>> [fileio/test (/data/customers/kxxxxxx/test.iscsi)]
>>   |     | o- lun1 ............................................
>> [fileio/kyyyyyyvsd (/data/customers/kyyyyyy/kyyyyyyvsd/backup.iscsi)]
>>   |     | o- lun2 ............................................
>> [fileio/kxxxxxxvsa (/data/customers/kxxxxxx/kxxxxxxvsa/backup.iscsi)]
>>   |     o- portals
>> .....................................................................................................
>> [2 Portals]
>>   |       o- 172.20.0.1:3260
>> ..................................................................................................
>> [OK]
>>   |       o- 172.20.20.1:3260
>> .................................................................................................
>> [OK]
>>   o- loopback
>> ...........................................................................................................
>> [0 Target]
>>   o- qla2xxx
>> ............................................................................................................
>> [0 Target]
>>   o- tcm_fc
>> .............................................................................................................
>> [0 Target]
>
> Now, i want to delete both iscs/.../luns/lun0 and
> backstores/fileio/test:
>> /iscsi/iqn.20...7c/tpgt1/luns> delete 0
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 983, in run_interactive
>>     self._cli_loop()
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 806, in _cli_loop
>>     self.run_cmdline(cmdline)
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 927, in run_cmdline
>>     self._execute_command(path, command, pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 902, in _execute_command
>>     result = target.execute_command(command, pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line
>> 85, in execute_command
>>     pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/configshell/node.py", line
>> 1405, in execute_command
>>     result = method(*pparams, **kparams)
>>   File "/usr/lib/python2.7/dist-packages/targetcli/ui_target.py",
>> line 804, in ui_command_delete
>>     lun_object.delete()
>>   File "/usr/lib/python2.7/dist-packages/rtslib/target.py", line 501,
>> in delete
>>     [mlun.delete() for mlun in self._list_mapped_luns()]
>>   File "/usr/lib/python2.7/dist-packages/rtslib/target.py", line 488,
>> 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.server01.x8664:sn.083f7c9e8233/tpgt_1/acls//iqn.1991-05.com.microsoft:kxxxxxxvsa.aaaaaaaaa.local/tag'
>> /iscsi/iqn.20...7c/tpgt1/luns> cd /backstores/fileio/
>>
>> /backstores/fileio> delete test
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 983, in run_interactive
>>     self._cli_loop()
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 806, in _cli_loop
>>     self.run_cmdline(cmdline)
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 927, in run_cmdline
>>     self._execute_command(path, command, pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/configshell/shell.py", line
>> 902, in _execute_command
>>     result = target.execute_command(command, pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/targetcli/ui_node.py", line
>> 85, in execute_command
>>     pparams, kparams)
>>   File "/usr/lib/python2.7/dist-packages/configshell/node.py", line
>> 1405, in execute_command
>>     result = method(*pparams, **kparams)
>>   File "/usr/lib/python2.7/dist-packages/targetcli/ui_backstore.py",
>> line 121, in ui_command_delete
>>     child.rtsnode.delete()
>>   File "/usr/lib/python2.7/dist-packages/rtslib/tcm.py", line 448, in
>> delete
>>     lun.delete()
>>   File "/usr/lib/python2.7/dist-packages/rtslib/target.py", line 501,
>> in delete
>>     [mlun.delete() for mlun in self._list_mapped_luns()]
>>   File "/usr/lib/python2.7/dist-packages/rtslib/target.py", line 488,
>> 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.server01.x8664:sn.083f7c9e8233/tpgt_1/acls//iqn.1991-05.com.microsoft:kxxxxxxvsa.aaaaaaaaa.local/tag'
>> /backstores/fileio> exit
>
> Cheers,
> Raoul

The issue seems to be with rtslib

I'm glad you've been able to work around for the time being. I see
upstream pushed some very recent fixes, which I suspect is the case of
your bug too.
http://www.risingtidesystems.com/git/?p=rtslib.git;a=commitdiff;h=9b9f3f6050acc4a700894d538d8d7475e33484f9

I am working with upstream to push a fresh revision of the LIO Target
Stack for Debian. We are working on the last minute details. Once the
upstream release goes official, you'll see a newer version in Debian
too, which should fix this issue.

-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to