Bug 1750865

Summary: The ISCSI_IQN_NAME_REGEX for the initiator name of iscsi doesn't match the rule of rfc3720
Product: [Fedora] Fedora Reporter: 837637215
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 31CC: anaconda-maint-list, awilliam, fzatlouk, hannsj_uhl, jkonecny, jonathan, kellin, kevin, mboddu, pasik, rvykydal, vanmeeuwen+fedora, vponcova, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: AcceptedFreezeException
Fixed In Version: anaconda-31.22.6-2.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-17 21:38:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1644940, 1704907    

Description 837637215 2019-09-10 16:18:53 UTC
Description of problem:
According to https://tools.ietf.org/html/rfc3720#section-3.2.6.3.1 and https://tools.ietf.org/html/rfc3721#page-5,
the iSCSI qualified name can be iqn.2001-04.com.example:storage:diskarrays-sn-a8675309,but this name can't match ISCSI_IQN_NAME_REGEX in anaconda/pyanaconda/core/regexes.py.


Version-Release number of selected component (if applicable):
All

How reproducible:
Use anaconda to install os in iSCSI storage and input initiator name with two or more colons and fill other necessary information.Can't go to next to log in;

Steps to Reproduce:
1.use anaconda to install os in iSCSI storage
2.input initiator name with two or more colons,e.g.,iqn.2001-04.com.example:storage:diskarrays-sn-a8675309

Actual results:
ISCSI_IQN_NAME_REGEX in anaconda/pyanaconda/core/regexes.py can't match this qualified name.

Expected results:
ISCSI_IQN_NAME_REGEX in anaconda/pyanaconda/core/regexes.py should match this qualified name.

Additional info:
The ISCSI_IQN_NAME_REGEX in anaconda/pyanaconda/core/regexes.py is
ISCSI_IQN_NAME_REGEX = re.compile(r'^iqn\.\d{4}-\d{2}((?<!-)\.(?!-)[a-zA-Z0-9\-]+){1,63}(?<!-)(?<!\.)(:[^:]+)?$')
As far as I am considered,it should be change to 
ISCSI_IQN_NAME_REGEX = re.compile(r'^iqn\.\d{4}-\d{2}((?<!-)\.(?!-)[a-zA-Z0-9\-]+){1,63}(?<!-)(?<!\.)(:[\S]+)?$') according to rfc3720

Comment 1 Radek Vykydal 2019-10-10 11:08:28 UTC
Proposing as freeze exception.

Comment 2 Radek Vykydal 2019-10-10 11:15:36 UTC
(In reply to Radek Vykydal from comment #1)
> Proposing as freeze exception.
The fix seems safe, isolated, and nice to have.

Comment 3 Adam Williamson 2019-10-10 15:33:19 UTC
I guess +1 FE as it can't be fixed with an update and can't really hurt anything else.

Comment 4 Kevin Fenzi 2019-10-10 17:38:56 UTC
+1 FE

Comment 5 Ben Cotton 2019-10-10 17:42:55 UTC
+1 FE

Comment 6 Mohan Boddu 2019-10-10 17:47:41 UTC
+1 FE

Comment 7 FrantiĊĦek Zatloukal 2019-10-10 17:53:14 UTC
+1 FE

Comment 8 Adam Williamson 2019-10-10 18:05:12 UTC
That's +5, marking accepted.

Comment 9 Fedora Update System 2019-10-14 13:28:18 UTC
FEDORA-2019-148f24b00f has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-148f24b00f

Comment 10 Fedora Update System 2019-10-14 14:52:00 UTC
anaconda-31.22.6-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-148f24b00f

Comment 11 Fedora Update System 2019-10-17 21:38:06 UTC
anaconda-31.22.6-2.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.