Bug 1470083 - Discovery settings 'Hostname_facts' should not be allowed to set empty
Discovery settings 'Hostname_facts' should not be allowed to set empty
Status: NEW
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Discovery Plugin (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Lukas Zapletal
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-12 07:36 EDT by Sachin Ghai
Modified: 2018-01-09 01:34 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
error on discovered host console when both values set to "empty" (67.10 KB, image/png)
2017-07-12 07:36 EDT, Sachin Ghai
no flags Details

  None (edit)
Description Sachin Ghai 2017-07-12 07:36:29 EDT
Created attachment 1296908 [details]
error on discovered host console when both values set to "empty"

Description of problem:
In 6.3 snap5, we see some new discovery settings like:

hostname_facts
hostname_prefix

If we set both values to empty then discovery will fail w/ error:
Exception: Invalid_facts: hash doesn't contain valid value for any of the facts in discovery_hostname

So as per above error, user shouldn't allow to set any of the above setting as "empty", ideally, hostname_facts shouldn't set as empty. On setting it empty, user should get an error message.



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

How reproducible:
always

Steps to Reproduce:
1. go to settings -> discovered
2. set empty value for both Hostname_prefix and Hostname_facts
3. 

Actual results:

as expected host discovery failed w/ error: 
Exception: Invalid_facts: hash doesn't contain valid value for any of the facts in discovery_hostname

Expected results:

User should not be allowed to change set "Hostname_facts" as empty" and error should be raised.
Additional info:
Comment 1 Sachin Ghai 2017-07-12 07:41:13 EDT
Instead of getting error after discovering the host, user should be restricted to set empty value for "hostname_facts" settings.
Comment 3 Lukas Zapletal 2017-07-12 08:44:05 EDT
Ok thanks, putting on backlog. Out of 6.3 plate.
Comment 4 Sachin Ghai 2017-08-10 06:44:41 EDT
Similar issue needs to be fixed in hammer.

]# hammer -u admin -p changeme settings set --name discovery_hostname --value ""
Setting [discovery_hostname] updated to []

Note You need to log in before you can comment on or make changes to this bug.