I ran into a combination of problems today. After some investigation, I found ROSE-Storage doesn’t comply RFC3722 for iSCSI name string profile.
My setup involved with a CCR2004-1G-2XS-PCIe, installed on my NAS server machine running TrueNAS Scale, as a special router to connect ZeroTier with the VMs running on my NAS, also working as a Dude server to monitor other devices. (A weird choice of configuration, I know.)
I have a iSCSI target set-up on NAS side for Dude server storage. The initiator is CCR2004 router card, using one of its PCIe ethernet port to access the host machine’s iSCSI target. It was totally fine when I’m using RouterOS 7.10.2 with TrueNAS Scale 22.12.2.
Recently RouterOS 7.11 was released so I scheduled an maintainance for my NAS server. I’m planned to swap my almost dead host system drive and update the TrueNAS system to latest 22.12.3.3 as well. After the upgrade for RouterOS and TrueNAS, the iSCSI target cannot be connected to the host side. CCR2004 reported a “scan failed” error for the target that was running correctly before.
So I dug deeper.
I logged into the NAS host side and looked at the log from SCST(iSCSI server software that TrueNAS Scale was using: , it was complaining:
Aug 16 02:09:44 SMSF-NAS-EX iscsi-scstd[241418]: Connect from 192.168.160.1:52200 to 192.168.160.2:3260
Aug 16 02:09:44 SMSF-NAS-EX iscsi-scstd[241418]: Name contains invalid character: S
And I captured some packet from the NAS host side.

The initiator name from router card is the identity I was given to it “SMSF-RouterCard”, and clearly SCST doesn’t like this.
I went to the source code of SCST, and found out this commit (the code comment “rtf” seems to be a typo):

And this naming limitation was indeed existed in RFC3722.
on page 2.
This commit was merged 3 months ago, and It seems TrueNAS Scale have updated their SCST service contained this code.
The default behavior of ROSE-Storage iSCSI of using system identity directly as the iSCSI initiator name seems can be a problem if user is using a identity name with uppercase characters, thus can violate RFC3722, and user won’t have a clue about why their router cannot use the iSCSI target on the TrueNAS.
I also tested the older version (7.10) on another standalone router, with a single uppercase character in identity name, same issue reproduced.
The temporal fix for this is just change the identity to a lowercase one, and re-enable the iSCSI target on the router. There is no option for initiator name setting right now. So a lowercase identity name is the only way to bypass this issue.
I suggest the ROSE-Storage package should have an option for user to set the system initiator name, and a default picked initiator name should not allow any invalid character that defined by RFC3722.