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

Discovery with authentication fails to boot #2612

Open
fulminemizzega opened this issue Jan 22, 2024 · 0 comments
Open

Discovery with authentication fails to boot #2612

fulminemizzega opened this issue Jan 22, 2024 · 0 comments
Labels
bug Our bugs iscsi Issues related to the iscsi module

Comments

@fulminemizzega
Copy link

Describe the bug
Boot fails with authentication error. I encountered this issue trying to setup iSCSI for the first time. I'm booting a Fedora 39 VM on hyper-v via iPXE, without iBFT, boot cmdline includes netroot=user:pass@ip:........, target is on TrueNAS CORE 13.0-U6.1 (freebsd based).
TrueNAS wizard sets up an iSCSI portal and it allows CHAP authentication for discovery. From what I've found, it looks like that on linux only target authentication is supported by targetcli or tgtadm, so I guess this combination is not common.

Distribution used
Fedora 39

Dracut version
dracut 059-16.fc39

Init system
systemd

To Reproduce
Setup a target with discovery authentication, try to boot from it specifying netroot parameters on the kernel cmdline.

Expected behavior
Boot the system

Additional context
I've managed to track where the error is generated:

targets=$(iscsiadm -m discovery -t st -p "$iscsi_target_ip":${iscsi_target_port:+$iscsi_target_port} | {

# iscsiadm -m discovery -t st -p 192.168.80.48
iscsiadm: Login failed to authenticate with target 
iscsiadm: discovery login to 192.168.80.48 rejected: initiator failed authorization
iscsiadm: Could not perform SendTargets discovery: iSCSI login failed due to authorization failure

Everything works fine if I instead disable authentication discovery and enable it on the target itself. To better explain the setup, here is the TrueNAS documentation: https://www.truenas.com/docs/core/13.0/uireference/sharing/iscsi/iscsishare/#manual-setup-screens
Expand the manual setup screens, the Portal tab contains the setting (Discovery Authentication Method) that caused this issue. The other authentication I'm referring to is under Targets tab (Authentication Method)

@fulminemizzega fulminemizzega added the bug Our bugs label Jan 22, 2024
@LaszloGombos LaszloGombos added the iscsi Issues related to the iscsi module label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs iscsi Issues related to the iscsi module
Projects
None yet
Development

No branches or pull requests

2 participants