Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1932369 - Use-ntp parameter does not work when provisioning RHEL 7 or CentOS 7
Summary: Use-ntp parameter does not work when provisioning RHEL 7 or CentOS 7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.8.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.10.0
Assignee: Oleh Fedorenko
QA Contact: Ondrej Gajdusek
URL:
Whiteboard:
: 1943947 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-24 13:44 UTC by Gunter Muller
Modified: 2023-05-16 11:06 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-16 14:10:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 32004 0 Normal New Use-ntp parameter does not work when provisioning RHEL 7 or CentOS 7 2021-03-03 14:03:40 UTC
Red Hat Product Errata RHSA-2021:4702 0 None None None 2021-11-16 14:10:21 UTC

Description Gunter Muller 2021-02-24 13:44:40 UTC
Description of problem:
The 'Kickstart default' and 'ntp' templates accept the 'use-ntp' parameter to support the ability to disable NTP and use CHRONY.

However, the code in both templates is broken. Both templates have this line:
use_ntp = host_param_true?('use-ntp') || (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 7)

However, setting use-ntp=false will never work "because of the default os check. os_major is <=7 which will always match for centos 7/rhel 7", which has been previously identified in the Foreman forum (ref. https://community.theforeman.org/t/use-ntp-parameter-does-not-work-when-provisioning-centos7/15763) and issue tracker (ref. https://projects.theforeman.org/issues/28077).
The suggested fix at the time was not accepted.

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


How reproducible:

Steps to Reproduce:
1. Set the host (group) or global boolean parameter use-ntp to false.
2. Open the 'Kickstart default' provisioning template and select Preview.
3. Review %package and %post section relating to ntp.

Actual results:
The ntp package is installed and configured. chrony is not installed.

Expected results:
chrony is used instead of ntp when use-ntp=false

Additional info:

The following working patch for the 'use_ntp = ...' line is:

if host_param_true?('use-ntp') || host_param_false?('use-ntp')
  use_ntp = host_param('use-ntp')
else
  use_ntp = (is_fedora && os_major < 16) || (rhel_compatible && os_major <= 7)
end

Comment 1 Oleh Fedorenko 2021-03-03 14:03:36 UTC
Created redmine issue https://projects.theforeman.org/issues/32004 from this bug

Comment 2 Bryan Kearney 2021-03-03 16:05:56 UTC
Upstream bug assigned to ofedoren

Comment 3 Bryan Kearney 2021-03-03 16:05:58 UTC
Upstream bug assigned to ofedoren

Comment 4 Bryan Kearney 2021-04-23 08:05:00 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/32004 has been resolved.

Comment 5 Patrick C. F. Ernzer 2021-05-10 11:52:24 UTC
*** Bug 1943947 has been marked as a duplicate of this bug. ***

Comment 6 Ondrej Gajdusek 2021-08-30 17:23:59 UTC
VERIFIED

satellite-6.10.0-0.8.beta.el7sat.noarch
foreman-2.5.2.4-1.el7sat.noarch

The `use-ntp` host parameter is taken into account and the package list is modified accordingly.

Comment 9 errata-xmlrpc 2021-11-16 14:10:12 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 (Moderate: Satellite 6.10 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:4702


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