All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phillip Brown <phillip.brown.j@gmail.com>
To: stgt@vger.kernel.org
Subject: "tgtadm --mode system --show" doesn't show  global 'outgoing' users if there are no global incoming users
Date: Fri, 15 Aug 2014 16:39:18 +1000	[thread overview]
Message-ID: <53EDAB16.7010505@gmail.com> (raw)

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

             reply	other threads:[~2014-08-15  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15  6:39 Phillip Brown [this message]
2014-08-22 10:23 ` "tgtadm --mode system --show" doesn't show global 'outgoing' users if there are no global incoming users FUJITA Tomonori
2014-08-22 10:33   ` FUJITA Tomonori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53EDAB16.7010505@gmail.com \
    --to=phillip.brown.j@gmail.com \
    --cc=stgt@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.