"tgtadm --mode system --show" doesn't show global 'outgoing' users if there are no global incoming users

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

 



Note - I am not subscribed to the mailing list

Noticed that if there are 'outgoing' users but no 'incoming' users bound at system level, then tgtadm --mode system --show does not show the outgoing users. c.f. at target level where targets show outgoing users even if there are no incoming users

[root@filer3 init.d]# tgtadm --op show --mode sys
System:
       State: ready
LLDs:
       iser: error
       iscsi: ready
Backing stores:
       rdwr (bsoflags sync:direct)
       aio
       ssc
       null
       bsg
       sg
Device types:
       passthrough
       tape
       changer
       controller
       osd
       cd/dvd
       disk
iSNS:
       iSNS=Off
       iSNSServerIP=
       iSNSServerPort=3205
       iSNSAccessControl=Off
[root@filer3 init.d]# tgtadm --lld iscsi --mode account --op new --user test --password testpass
[root@filer3 init.d]# tgtadm --mode account --op bind --user test --outgoing
[root@filer3 init.d]# tgtadm --mode sys --op show
System:
       State: ready
LLDs:
       iser: error
       iscsi: ready
Backing stores:
       rdwr (bsoflags sync:direct)
       aio
       ssc
       null
       bsg
       sg
Device types:
       passthrough
       tape
       changer
       controller
       osd
       cd/dvd
       disk
iSNS: *   Account info for outg**oing user should be here*
       iSNS=Off
       iSNSServerIP=
       iSNSServerPort=3205
       iSNSAccessControl=Off
[root@filer3 init.d]# tgtadm --mode account --op bind --user test
[root@filer3 init.d]# tgtadm --mode sys --op show
System:
       State: ready
LLDs:
       iser: error
       iscsi: ready
Backing stores:
       rdwr (bsoflags sync:direct)
       aio
       ssc
       null
       bsg
       sg
Device types:
       passthrough
       tape
       changer
       controller
       osd
       cd/dvd
       disk
Account information:
       test
       test (outgoing)
iSNS:
       iSNS=Off
       iSNSServerIP=
       iSNSServerPort=3205
       iSNSAccessControl=Off
[root@filer3 init.d]#


Problem seems to be with this 'if' statement in targets.c:system_show function

--------->> if (global_target.account.nr_inaccount) {
                               int i, aid;
concat_printf(b, _TAB1 "%s\n", "Account information:\n"); for (i = 0; i < global_target.account.nr_inaccount; i++) { aid = global_target.account.in_aids[i]; concat_printf(b, _TAB1 "%s\n",
           __account_lookup_id(aid)->user);
                               }
                               if (global_target.account.out_aid) {
aid = global_target.account.out_aid; concat_printf(b, _TAB1 "%s (outgoing)\n",
           __account_lookup_id(aid)->user);
                               }
               }

Does there really need to be that test?

regards

Phillip Brown
--
To unsubscribe from this list: send the line "unsubscribe stgt" 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]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux