public inbox for stgt@vger.kernel.org
 help / color / mirror / Atom feed
* "tgtadm --mode system --show" doesn't show  global 'outgoing' users if there are no global incoming users
@ 2014-08-15  6:39 Phillip Brown
  2014-08-22 10:23 ` FUJITA Tomonori
  0 siblings, 1 reply; 3+ messages in thread
From: Phillip Brown @ 2014-08-15  6:39 UTC (permalink / raw)
  To: stgt

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-22 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-15  6:39 "tgtadm --mode system --show" doesn't show global 'outgoing' users if there are no global incoming users Phillip Brown
2014-08-22 10:23 ` FUJITA Tomonori
2014-08-22 10:33   ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox