Fix Discovery Auth Group dropdown menu in new UI
I've been attempting to set up CHAP or Mutual CHAP authentication with iSCSI and have run across what I believe to be a UI form bug, and some confusing form validation errors when attempting to add a Portal. After adding an Authorized Access entry with either 1 or 2 credentials, I then go back to Portal and attempt to add a new Portal entry. Selecting either "CHAP" or "Mutual CHAP" results in an empty Discovery Auth Group drop down. Clicking Save (just to see the error message) then results in an erroneous error message suggesting that "Chap" or "mutual_chap" are invalid choices, when they clearly are not.
I can work around this by hitting the back-end API directly with valid values for the time being. Let me know if you need more information or debug logs.
#3 Updated by Thomas Gallen almost 2 years ago
I've taken a moment to familiarizing myself with how the new FreeNAS interface is interacting with the back-end API, and it would seem that the current Portal forms, both create and edit, are submitting the following values for the Discovery Auth Method field:
"None" > "None"
"CHAP" > "Chap"
"Mutual CHAP" > "mutual_chap"
As far as I'm aware, the documentation states that it should be producing the following values:
"None" > "None"
"CHAP" > "CHAP"
"Mutual CHAP" > "CHAP Mutual"
I've tested these values against one of the FreeNAS-11.2-RC1 machines I have available and this seems to fix the error messages referencing the Discovery Auth Method field. I also noticed that these values appear to be case sensitive.
This doesn't do anything for pre-populating/populating the Discovery Auth Group drop-down, however.
#4 Updated by Thomas Gallen almost 2 years ago
The issue with the Discovery Auth Method drop-down was just the constants in the files below. See also attached.
#5 Updated by Thomas Gallen almost 2 years ago
The issue with the Discovery Auth Group field is that the typescript to populate the field has yet to be written. I'm off the clock in a few minutes so I won't be able to finish a patch for it today, but it should be trivial to adapt the code already in use for the Target forms to grab a list of Authorized Access group IDs.
#9 Updated by Thomas Gallen almost 2 years ago
I can confirm that the drop-down boxes for both Discovery Auth Method and Discovery Auth Group are now functioning as expected. Thanks for fixing this so quickly! I really appreciate it as I've been wanting to demonstrate the iSCSI functionality for the past few weeks.
#11 Updated by Jeff Ervin almost 2 years ago
- File Screen Shot 2018-11-01 at 2.54.39 PM.png Screen Shot 2018-11-01 at 2.54.39 PM.png added
- File Screen Shot 2018-11-01 at 2.55.00 PM.png Screen Shot 2018-11-01 at 2.55.00 PM.png added
- File Screen Shot 2018-11-01 at 2.55.55 PM.png Screen Shot 2018-11-01 at 2.55.55 PM.png added
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
Test Passed FreeNAS-11.2-INTERNAL32
Used the following (with modifications - see screenshots). Received no errors when saving.
Create a zvol for your iscsi share - at least 30 GiB
Go to Sharing -> ISCSI -> Portals and name the comment: iscsi test. Leave Discovery Auth Method: and Discovery Auth Group: as None. Select the IP address of the TrueNAS testing system and the port should be 3260
Go to Sharing -> ISCSI -> Initiators and leave the values at the default and Save
Skip Sharing -> ISCSI -> Authorized Address
Go to Sharing -> ISCSI -> Targets: Add a Target. Name Target Name and Target Access d1. Choose Portal Group ID: and Initiator Group ID: from the pop up list. Click Save
Go to Services -> ISCSI -> Extents and click Add Extent. The name is d1. The Extent Type is Device and for the Device choose the zvol you created, check Disable block size reporting, and be sure the block size is 512. Type "iscsi test" in the comment field and Click the Save button.
Go to Sharing -> ISCSI -> Associated Targets and click Add Target/Extent. Select d1 from the target pop up list, make the LUN ID 100, and choose d1 for the Extent. Click the Save button
Go to Services - ISCSI and turn it on and click Start on Boot
Write down the IP address from the Sharing -> ISCSI -> Portals