Bug 1470676

Summary: Validations around Hostname_prefix setting are missing
Product: Red Hat Satellite Reporter: Sachin Ghai <sghai>
Component: Discovery PluginAssignee: Lukas Zapletal <lzap>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 6.3.0CC: jcallaha, lzap
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 17:45:58 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:

Description Sachin Ghai 2017-07-13 12:48:06 UTC
Description of problem:
Hostname_prefix setting description says: The default prefix to use for the host name, must start with a letter

Since we know that prefix must start w/ letter then lets add some validation around prefix. For now I can enter any string for this setting, which may not work when host is discovered.

Like: I tried -mac(notice - ) and it was updated, though when I discovered host, given prefix was not set. So we should add validations.

Version-Release number of selected component (if applicable):
sat6.3 snap6

How reproducible:


Steps to Reproduce:
1. go to Administer -> settings -> discovered -> hostname_prefix
2. set some string which doesn't start w/ letter
3.

Actual results:
any string starting w/ special characters, number is being accepted

Expected results:
user shouldn't be able to set any random string. in case user tries to update string which doesn't start w/ letter, should get validation error.

Additional info:

Comment 2 Sachin Ghai 2017-08-10 10:37:46 UTC
Please note similar validation needs to be set in hammer:
]# hammer -u admin -p changeme settings list | grep discovery_prefix
discovery_prefix                                       |                                                                        | The default prefix to use for the host name, must start with a letter           
[root@cloud-qe]# hammer -u admin -p changeme settings set --name discovery_prefix --value "1mac"
Setting [discovery_prefix] updated to [1mac]

Comment 3 Bryan Kearney 2018-09-04 17:45:58 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.