Bug 2094301

Summary: Provisioning Templates on RH Satellite 6.9 and 6.10 does not install and enable Chronyd by default on RHEL 7 provisioned systems
Product: Red Hat Satellite Reporter: momran
Component: Provisioning TemplatesAssignee: Leos Stejskal <lstejska>
Status: CLOSED ERRATA QA Contact: sganar
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.10.5CC: bagasse, lstejska, mhulan, sganar, shwsingh
Target Milestone: 6.14.0Keywords: EasyFix, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: foreman-3.7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-08 14:18:01 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 momran 2022-06-07 11:04:23 UTC
Description of problem:
=======================

According to [1], Chrony should be preferred for all systems except for the systems that are managed or monitored by tools that do not support chrony, or the systems that have a hardware reference clock which cannot be used with chrony.

However, when provisioning RHEL 7.x systems via Red Hat Satellite 6.9 or 6.10, the 'chrony' package is not even installed on the provisioned system.

[1] https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-configuring_ntp_using_the_chrony_suite#sect-Choosing_between_NTP_daemon


Version-Release number of selected component (if applicable):
=============================================================
 - Red Hat Satellite 6.9
 - Red Hat Satellite 6.10


How reproducible:
=================
Always.


Steps to Reproduce:
===================
Provision a RHEL 7.x system using the default provisioning templates via Red Hat Satellite 6.9 or 6.10.


Actual results:
===============
The 'chrony' package is not even installed on the provisioned RHEL 7.x system.


Expected results:
=================
The RHEL 7.x system is provisioned with the 'chrony' package installed, and 'Chronyd' configured and started.

Comment 1 momran 2022-06-07 11:12:18 UTC
- In /usr/share/foreman/app/views/unattended/provisioning_templates/provision/kickstart_default.erb on Satellite 6.9:

    54	  use_ntp = host_param_true?('use-ntp') || (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 7)

   179	<% if use_ntp -%>
   180	timezone --utc <%= host_param('time-zone') || 'UTC' %>
   181	<% else -%>
   182	timezone --utc <%= host_param('time-zone') || 'UTC' %> <%= host_param('ntp-server') ? "--ntpservers #{host_param('ntp-server')}" : '' %>
   183	<% end -%>

   222	<% if use_ntp -%>
   223	ntp
   224	-chrony
   225	<% else -%>
   226	chrony
   227	-ntp
   228	<% end -%>


- In /usr/share/foreman/app/views/unattended/provisioning_templates/provision/kickstart_default.erb on Satellite 6.10:

    56	  use_ntp = host_param_true?('use-ntp', (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 7))

   231	<% if use_ntp -%>
   232	ntp
   233	-chrony
   234	<% else -%>
   235	chrony
   236	-ntp
   237	<% end -%>

Comment 3 Leos Stejskal 2023-05-30 11:03:28 UTC
Hi,
this is going to be fixed in 6.14 [0]. For 6.13 it needs to be cherry-picked, moving to modified.

[0] https://github.com/theforeman/foreman/pull/9544

Comment 4 Leos Stejskal 2023-05-30 11:05:11 UTC
Moving to ON_QA as it is already in 6.14 and there is no plan to cherry-pick it for now.

Comment 7 sganar 2023-06-07 12:35:43 UTC
Verified.

Tested on Satellite 6.14.0 Snap 2.0

Steps followed: 
1. Configure a satellite for provisioning
2. Provision a RHEL7 host

Observation: 
The RHEL7 host was successfully provisioned with chrony package installed and Chronyd service started and running.

Comment 10 errata-xmlrpc 2023-11-08 14:18:01 UTC
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 (Important: Satellite 6.14 security and bug fix update), 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-2023:6818