You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In demo mode, sessions listed in the TPG's dynamic_sessions file in configfs are not shown in targetcli sessions list or targetcli sessions detail. This appears to be the same issue described in this RedHat Bugzilla ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1161489
I'm running my tests on Ubuntu 18.04, which has kernel 4.15.0-23 and targetcli-fb 2.1.43-1 (aka 2.1fb43).
For example, if a target has an open session...
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ cat fabric_statistics/iscsi_instance/sessions
1
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ cat tpgt_1/dynamic_sessions
iqn.1993-08.org.debian:01:bb4224e84355
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ sudo targetcli sessions list
(no open sessions)
If I create an ACL for the initiator, the session information becomes available.
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ sudo targetcli /iscsi/iqn.2018-06.com.example:testtarget/tpg1/acls create iqn.1993-08.org.debian:01:bb4224e84355
Created Node ACL for iqn.1993-08.org.debian:01:bb4224e84355
Created mapped LUN 0.
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ sudo targetcli sessions list
alias: lio-iscsi sid: 2 type: Normal session-state: LOGGED_IN
matt@lio-iscsi:/sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget$ sudo targetcli sessions detail
alias: lio-iscsi sid: 2 type: Normal session-state: LOGGED_IN
name: iqn.1993-08.org.debian:01:bb4224e84355 (NOT AUTHENTICATED)
mapped-lun: 0 backstore: fileio/matt_100m.img mode: rw
address: 127.0.0.1 (TCP) cid: 0 connection-state: LOGGED_IN
If I stat the dynamic_sessions file, the atime/ctime/mtime change with every execution of stat:
Additionally, inotify is not able to detect changes in the file: as a simple test, iwatch /sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget/tpgt_1/dynamic_sessions does not display any events when an initiator connects or disconnects. I was hoping to work around the issue by monitoring dynamic_sessions for changes and running a script that creates ACLs when new initiators connect, which will be much less efficient without reliable timestamps or inotify.
The target's fabric_statistics/iscsi_instance/sessions file misbehaves the the same way with stat and inotify. I suspect this is due to something along the lines of the dynamic_sessions and sessions being pseudo-files that directly access kernel data structures when read, so there never actually are any write events for inotify to detect.
Should session information be available for dynamic sessions? Or, is this intended behavior?
Is there an alternative way (via configfs/etc.) to get information about dynamic sessions?
Is there any trick to getting dynamic_sessions to work properly with stat and inotify/iwatch?
The text was updated successfully, but these errors were encountered:
iammattcoleman
changed the title
sessions are not listed for dynamic ACLs
sessions are not listed for dynamic sessions
Jun 22, 2018
iammattcoleman
changed the title
sessions are not listed for dynamic sessionstargetcli sessions list does not show dynamic sessions
Jun 22, 2018
iammattcoleman
changed the title
targetcli sessions list does not show dynamic sessionstargetcli sessions does not show dynamic sessions
Jun 22, 2018
In demo mode, sessions listed in the TPG's
dynamic_sessions
file in configfs are not shown intargetcli sessions list
ortargetcli sessions detail
. This appears to be the same issue described in this RedHat Bugzilla ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1161489I'm running my tests on Ubuntu 18.04, which has kernel 4.15.0-23 and targetcli-fb 2.1.43-1 (aka 2.1fb43).
For example, if a target has an open session...
If I create an ACL for the initiator, the session information becomes available.
If I
stat
thedynamic_sessions
file, the atime/ctime/mtime change with every execution ofstat
:Additionally, inotify is not able to detect changes in the file: as a simple test,
iwatch /sys/kernel/config/target/iscsi/iqn.2018-06.com.example:testtarget/tpgt_1/dynamic_sessions
does not display any events when an initiator connects or disconnects. I was hoping to work around the issue by monitoringdynamic_sessions
for changes and running a script that creates ACLs when new initiators connect, which will be much less efficient without reliable timestamps or inotify.The target's
fabric_statistics/iscsi_instance/sessions
file misbehaves the the same way withstat
andinotify
. I suspect this is due to something along the lines of thedynamic_sessions
andsessions
being pseudo-files that directly access kernel data structures when read, so there never actually are any write events forinotify
to detect.dynamic_sessions
to work properly withstat
andinotify
/iwatch
?The text was updated successfully, but these errors were encountered: