Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initiator name not sent to target #109

Open
imdebating opened this issue Apr 5, 2019 · 4 comments
Open

Initiator name not sent to target #109

imdebating opened this issue Apr 5, 2019 · 4 comments

Comments

@imdebating
Copy link

When attempting to login to the target, the default initiator name is being sent.

Error

[user@host ~]$ iscsictl list targets
iqn.2015-03.com.domain:host <inactive, static>
172.16.61.1 <inactive, port 3260, interface vlan0>
[user@host ~]$ iscsictl login iqn.2015-03.com.domain:host
iscsictl: **The target has denied access**

I have changed my hostname and iqn here for privacy, but as you will see, it doesn't matter because it's not what targetd is receiving on the target.

Target log from /var/log/messages on rhel7:

Apr  5 15:22:31 tardis kernel: iSCSI Initiator Node: iqn.2015-01.com.localhost is not authorized to access iSCSI target portal group: 1.
Apr  5 15:22:31 tardis kernel: iSCSI Login negotiation failed.

When I change my targetd config to include iqn.2015-01.com.localhost, I am able to login and list the luns.

targetcli on host

/iscsi/iqn.20...dis/tpg1/acls> ls
o- acls .............................................................. [ACLs: 3]
  o- iqn.2015-01.com.localhost ................................ [Mapped LUNs: 3]
  | o- mapped_lun0 .................................. [lun0 block/internal (rw)]
  | o- mapped_lun1 ................................... [lun1 block/storage (rw)]
  | o- mapped_lun2 .................................. [lun2 block/external (rw)]

Commands executed on client:

[user@host ~]$ iscsictl login iqn.2015-03.com.domain:host
Attached iqn.2015-03.ca.ifeelfine:tardis <scsi domain 1, target 0>
	LIO-ORG internal 4.0
	Serial Number 0346de12-47af-4851-94ee-69caeec0de43
	lun 2: type 0x00 (Block device)
	lun 1: type 0x00 (Block device)
	lun 0: type 0x00 (Block device)

[user@host ~]$ iscsictl list luns
iqn.2015-03.com.domain:host <scsi domain 1, target 0>
	LIO-ORG internal 4.0
	Serial Number 0346de12-47af-4851-94ee-69caeec0de43
	lun 2: type 0x00 (Block device)
		disk4: 1 TB (1953191808 512 byte blocks)
	lun 1: type 0x00 (Block device)
		disk6: 3 TB (5860467632 512 byte blocks)
	lun 0: type 0x00 (Block device)
		disk5: 733.91 GB (1433416463 512 byte blocks)

Using the default initiator value, I can connect and mount the luns.

How can I make sure that my custom initiator string is sent?

@nsinenian
Copy link
Member

The first step is to determine whether it is a bug in the code or whether it is a configuration issue where your config file cannot be read by the iSCSI daemon.

When you change the initiator's IQN using iscsictl modify initiator-config are you able to see the custom IQN you have specified if you execute iscsictl list initiator-config?

@Luflosi
Copy link

Luflosi commented Sep 18, 2019

I experienced the exact same behaviour. iscsictl list initiator-config shows my custom IQN.

@Peacekeeper2000
Copy link

Here the same and the target host is logging (iqn.2015-01.com.localhost): initiator does not match allowed initiator name.
but I have customized my initiator-config. When I use iscsictl list initiator-config I can see my customisation. But it looks that the program is using during iscsictl logon still the default value of the source code.

@mischievous
Copy link

I have the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants