-
Sub-task
-
Resolution: Done
-
Undefined
-
None
-
None
Description of problem:
The Hostname prefix (discovery_prefix) setting in Satellite allows invalid characters to be saved, leading to unexpected behavior in host naming. The system accepts inputs that do not align with the settings description which says must start with a letter and do not conform to standard hostname conventions, such as -mac, ^%$, and 12_t.
How reproducible:
Always
Is this issue a regression from an earlier version:
Steps to Reproduce:
1. log in to satellite
2. go to administer > settings
3. select discovery section
4. Update Hostname prefix(discovery_prefix) setting with invalid input like -mac, ^%$, 12_t etc.
Actual behavior:
Hostname prefix(discovery_prefix) setting successfully gets updated with invalid input
Expected behavior:
Hostname prefix(discovery_prefix) setting should not be updated with invalid input, rather it should railse a validation message like
```Error updating setting: Value must start with a letter```.
]
Business Impact / Additional info:
Customers by mistake can update the setting with invalid data which is not ideal and can cause issues.
QE Tracker for https://issues.redhat.com/browse/SAT-37365