Bug 1470083
Summary: | Discovery settings 'Hostname_facts' should not be allowed to set empty | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sachin Ghai <sghai> | ||||
Component: | Discovery Plugin | Assignee: | Rahul Bajaj <rabajaj> | ||||
Status: | CLOSED ERRATA | QA Contact: | Roman Plevka <rplevka> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.3.0 | CC: | akjha, aruzicka, lzap, rabajaj, swadeley | ||||
Target Milestone: | 6.9.0 | Keywords: | Reopened, 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: | 2021-04-21 13:11:19 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: | |||||||
Attachments: |
|
Instead of getting error after discovering the host, user should be restricted to set empty value for "hostname_facts" settings. Ok thanks, putting on backlog. Out of 6.3 plate. Similar issue needs to be fixed in hammer. ]# hammer -u admin -p changeme settings set --name discovery_hostname --value "" Setting [discovery_hostname] updated to [] 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. Upstream bug assigned to rabajaj Upstream bug assigned to rabajaj Hello, Looks like this issue is fixed upstream: https://github.com/theforeman/foreman_discovery/pull/505 Let me know if anything else is required here. Thank you, VERIFIED on sat6.9.0-14.0 the aforementioned facts can't be blank now. trying to change it via UI -> results in 422. using CLI (API): [root@qe-sat69-rhel7-tier3 ~]# hammer setting set --name discovery_hostname --value "" Could not update the setting: Value can't be blank [root@qe-sat69-rhel7-tier3 ~]# hammer setting set --name discovery_prefix --value "" Could not update the setting: Value can't be blank Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.9 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:1313 |
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: