Skip to content

Commit 05efeae

Browse files
authored
Merge pull request #36867 from aireilly/TELCODOCS-260/262_disable_chronyd
TELCODOCS-260: Ensure chronyd is disabled before enabling PTP
2 parents dc57af2 + 8e1c38c commit 05efeae

File tree

5 files changed

+71
-2
lines changed

5 files changed

+71
-2
lines changed

modules/cnf-disable-chronyd.adoc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/using-ptp.adoc
4+
5+
[id="cnf-disable-chronyd_{context}"]
6+
= Disabling the chrony time service
7+
8+
You can disable the chrony time service (`chronyd`) for nodes with a specific role by using a `MachineConfig` custom resource (CR).
9+
10+
.Prerequisites
11+
12+
* Install the OpenShift CLI (`oc`).
13+
* Log in as a user with `cluster-admin` privileges.
14+
15+
.Procedure
16+
17+
. Create the `MachineConfig` CR that disables `chronyd` for the specified node role.
18+
19+
.. Save the following YAML in the `disable-chronyd.yaml` file:
20+
+
21+
[source,yaml]
22+
----
23+
apiVersion: machineconfiguration.openshift.io/v1
24+
kind: MachineConfig
25+
metadata:
26+
labels:
27+
machineconfiguration.openshift.io/role: <node_role> <1>
28+
name: disable-chronyd
29+
spec:
30+
config:
31+
ignition:
32+
version: 3.2.0
33+
systemd:
34+
units:
35+
- contents: |
36+
[Unit]
37+
Description=NTP client/server
38+
Documentation=man:chronyd(8) man:chrony.conf(5)
39+
After=ntpdate.service sntp.service ntpd.service
40+
Conflicts=ntpd.service systemd-timesyncd.service
41+
ConditionCapability=CAP_SYS_TIME
42+
[Service]
43+
Type=forking
44+
PIDFile=/run/chrony/chronyd.pid
45+
EnvironmentFile=-/etc/sysconfig/chronyd
46+
ExecStart=/usr/sbin/chronyd $OPTIONS
47+
ExecStartPost=/usr/libexec/chrony-helper update-daemon
48+
PrivateTmp=yes
49+
ProtectHome=yes
50+
ProtectSystem=full
51+
[Install]
52+
WantedBy=multi-user.target
53+
enabled: false
54+
name: "chronyd.service"
55+
----
56+
<1> Node role where you want to disable `chronyd`, for example, `master`.
57+
58+
.. Create the `MachineConfig` CR by running the following command:
59+
+
60+
[source,terminal]
61+
----
62+
$ oc create -f disable-chronyd.yaml
63+
----

modules/nw-ptp-installing-operator-cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * networking/installing-ptp-operator.adoc
3+
// * networking/using-ptp.adoc
44

55
[id="install-ptp-operator-cli_{context}"]
66
= Installing the PTP Operator using the CLI

modules/nw-ptp-installing-operator-web-console.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Module included in the following assemblies:
22
//
3-
// * networking/installing-ptp-operator.adoc
3+
// * networking/using-ptp.adoc
44

55
[id="install-ptp-operator-web-console_{context}"]
66
= Installing the PTP Operator using the web console

networking/using-ptp.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ You can use the {product-title} console or `oc` CLI to install PTP by deploying
2525

2626
include::modules/nw-ptp-introduction.adoc[leveloffset=+1]
2727

28+
[IMPORTANT]
29+
====
30+
Before enabling PTP, ensure that NTP is disabled for the required nodes. You can disable the chrony time service (`chronyd`) using a `MachineConfig` custom resource. For more information, see xref:../post_installation_configuration/machine-configuration-tasks.adoc#cnf-disable-chronyd_post-install-machine-configuration-tasks[Disabling chrony time service].
31+
====
32+
2833
include::modules/nw-ptp-installing-operator-cli.adoc[leveloffset=+1]
2934

3035
include::modules/nw-ptp-installing-operator-web-console.adoc[leveloffset=+1]

post_installation_configuration/machine-configuration-tasks.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ link:https://access.redhat.com/solutions/4510281[updating] SSH authorized keys,
2727
{product-title} supports link:https://coreos.github.io/ignition/configuration-v3_2/[Ignition specification version 3.2]. All new machine configs you create going forward should be based on Ignition specification version 3.2. If you are upgrading your {product-title} cluster, any existing Ignition specification version 2.x machine configs will be translated automatically to specification version 3.2.
2828

2929
include::modules/installation-special-config-chrony.adoc[leveloffset=+2]
30+
include::modules/cnf-disable-chronyd.adoc[leveloffset=+2]
3031
include::modules/nodes-nodes-kernel-arguments.adoc[leveloffset=+2]
3132
include::modules/rhcos-enabling-multipath-day-2.adoc[leveloffset=+2]
3233

0 commit comments

Comments
 (0)