On 03/19/2012 05:51 PM, FUJITA Tomonori wrote: > On Wed, 14 Mar 2012 17:07:50 -0700 > Andy Grover <agrover@xxxxxxxxxx> wrote: > >> I've tested that the config settings are applied correctly, but haven't >> been able to do sendtargets when discovery auth is configured. I'm not >> sure if it's target or initiator misconfiguration on my part, but I >> thought submitting this patch would make it easier for others to help >> verify whether the feature works or not. :) > > Hmm, seems it works for me. Oh, well that's good to hear. Please apply? Thanks -- Regards -- Andy > > I set up an account for discovery (add "fujita" account): > > root@rose:~# ./git/tgt/usr/tgtadm --op show --mode sysSystem: > State: ready > debug: off > LLDs: > 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: > > fujita > iSNS: > iSNS=Off > iSNSServerIP= > iSNSServerPort=3205 > iSNSAccessControl=Off > > > And the discovery fails: > > root@peach:/home/fujita# ./open-iscsi/usr/iscsiadm -m discoverydb -t st -p 10.76.0.1 --discover > iscsiadm: Login failed to authenticate with target > iscsiadm: discovery login to 10.76.0.1 rejected: initiator failed > authorization > > iscsiadm: Could not perform SendTargets discovery: iSCSI login failed > due to authorization failure > > > I configure the initiator side: > > root@peach:/home/fujita# ./open-iscsi/usr/iscsiadm -m discoverydb > --type st --portal 10.76.0.1# BEGIN RECORD 2.0-872 > discovery.startup = manual > discovery.type = sendtargets > discovery.sendtargets.address = 10.76.0.1 > discovery.sendtargets.port = 3260 > discovery.sendtargets.auth.authmethod = CHAP > discovery.sendtargets.auth.username = fujita > discovery.sendtargets.auth.password = ******** > discovery.sendtargets.auth.username_in = <empty> > discovery.sendtargets.auth.password_in = <empty> > discovery.sendtargets.timeo.login_timeout = 15 > discovery.sendtargets.use_discoveryd = No > discovery.sendtargets.discoveryd_poll_inval = 30 > discovery.sendtargets.reopen_max = 5 > discovery.sendtargets.timeo.auth_timeout = 45 > discovery.sendtargets.timeo.active_timeout = 30 > discovery.sendtargets.iscsi.MaxRecvDataSegmentLength = 32768 > # END RECORD > > > Then, the discovery works: > > root@peach:/home/fujita# ./open-iscsi/usr/iscsiadm -m discoverydb > --type st --portal 10.76.0.1 --discover > 10.76.0.1:3260,1 iqn.2001-04.com.example:storage.sr.rose.sys1.xyz -- 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