Bug 2180803 - [RFE] Foreman-maintain health check should check hostname
Summary: [RFE] Foreman-maintain health check should check hostname
Keywords:
Status: NEW
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Maintain
Version: 6.10.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Satellite QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-22 11:06 UTC by Vedashree Deshpande
Modified: 2023-08-09 12:51 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-19457 0 None None None 2023-08-09 12:51:05 UTC
Red Hat Knowledge Base (Solution) 7004971 0 None None None 2023-03-29 16:10:05 UTC

Description Vedashree Deshpande 2023-03-22 11:06:58 UTC
Description of problem:
As of now, we do not check in health check if Satellite FQDN is set or not. So before configuring new  DNS, DHCP or updating certificates we should have foreman-maintain health check run and it should check proper FQDN. 

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

Actual results:
# foreman-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Clean old Kernel and initramfs files from tftp-boot:                  [OK]
--------------------------------------------------------------------------------
Check number of fact names in database:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:           [OK]
--------------------------------------------------------------------------------
Check for paused tasks:                                               [OK]
--------------------------------------------------------------------------------
Check to verify no empty CA cert requests exist:                      [OK]
--------------------------------------------------------------------------------
Check whether system is self-registered or not:                       [OK]
--------------------------------------------------------------------------------

Expected results:
It should include hostname check. 

Additional info:

Comment 1 Vedashree Deshpande 2023-03-22 11:41:37 UTC
We can check and verify the outputs of

$ hostnamectl status
$ ping -c1 hostname -f
$ ping -c1 localhost

Comment 3 Sayan Das 2023-05-09 15:34:11 UTC
I was discussing this BZ with Vedashree as I was a bit confused. But after discussing with her, I believe the right intention here is :

* A hostname check should be included in the foreman_maintain's health check code:

* The *check* should be able to 

  * Check the current FQDN
  * Check the FQDN recognized by satellite ( i.e. in the configuration of satellite )
  * Verify that both FQDN matches with each other
  * If they don't, print both the FQDNs and request user to fix that mismatch. 

In that way, A manual OS level change in FQDN or change in the domain of the host can be easily detected.


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