I am starting on the implementation to fix [1]. As per [2], this is what I understand:
1. On RHEL 6 and earlier, only ntpdata/ntpd will be installed and enabled.
2. On Fedora/RHEL 7, ntp will not be explicitly removed (as it is done now)
Hence, as a result of 2 above, we may have both ntp and chrony installed
(For ex. if a test needs it). In this case, we should enable only chrony.
The 'rhts_post' snippet checks if no_clock_sync have been defined. If not,
it checks for the presence of ntpdate/ntpd and enables the services accordingly.
It also configures chrony, if it finds that it is installed.
The Fedora and RHEl 7 kickstarts enables chrony via the Anaconda command:
services --enabled=chronyd,chrony-wait
So what we effectively want is that if chrony is installed (meaning we are on Fedora/RHEL
7),
ntpdate/ntpd should be disabled. Thus the following patch should probably
do what we want:
Server/bkr/server/kickstarts/Fedora | 1 -
Server/bkr/server/kickstarts/RedHatEnterpriseLinux7 | 1 -
Server/bkr/server/snippets/rhts_post | 2 ++
3 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Server/bkr/server/kickstarts/Fedora b/Server/bkr/server/kickstarts/Fedora
index 01f292b..6b60d08 100644
--- a/Server/bkr/server/kickstarts/Fedora
+++ b/Server/bkr/server/kickstarts/Fedora
@@ -80,7 +80,6 @@ uboot-tools
{% endif %}
{% if no_clock_sync is undefined %}
chrony
--ntp
{% endif %}
{% snippet 'packages' %}
%end
diff --git a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux7
b/Server/bkr/server/kickstarts/RedHatEnterpriseLinux7
index 00bd334..cfe9b68 100644
--- a/Server/bkr/server/kickstarts/RedHatEnterpriseLinux7
+++ b/Server/bkr/server/kickstarts/RedHatEnterpriseLinux7
@@ -68,7 +68,6 @@ install
{% snippet 'packages' %}
{% if no_clock_sync is undefined %}
chrony
--ntp
{% endif %}
%end
diff --git a/Server/bkr/server/snippets/rhts_post b/Server/bkr/server/snippets/rhts_post
index 93946ad..8b830c8 100644
--- a/Server/bkr/server/snippets/rhts_post
+++ b/Server/bkr/server/snippets/rhts_post
@@ -61,6 +61,8 @@ if [ -e /etc/chrony.conf ] ; then
# setting iburst should speed up initial sync
#
https://bugzilla.redhat.com/show_bug.cgi?id=787042#c12
echo NTPSERVERARGS=iburst >>/etc/sysconfig/network
+ /sbin/chkconfig ntpd off >/dev/null 2>&1 || :
+ /sbin/chkconfig ntpdate off >/dev/null 2>&1 || :
fi
{% endif %}
[1]
https://bugzilla.redhat.com/show_bug.cgi?id=1002928
[2]
https://bugzilla.redhat.com/show_bug.cgi?id=1002928#c7
What do you all think?
Best,
Amit.
--
Amit Saha <
http://echorand.me>
Infrastructure Engineering and Development
Red Hat, Inc.