Skip to content

Commit 8264910

Browse files
authored
Merge pull request #91166 from rohennes/TELCODOCS-2099
TELCODOCS-2099: Support for dual-port ordinary clock in PTP
2 parents 49eb7d3 + 61edb1c commit 8264910

File tree

4 files changed

+133
-0
lines changed

4 files changed

+133
-0
lines changed
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ptp/configuring-ptp.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="configuring-linuxptp-services-oc-dual-port_{context}"]
7+
= Configuring linuxptp services as an ordinary clock with dual-port NIC redundancy
8+
9+
You can configure `linuxptp` services (`ptp4l`, `phc2sys`) as an ordinary clock with dual-port NIC redundancy by creating a `PtpConfig` custom resource (CR) object.
10+
In a dual-port NIC configuration for an ordinary clock, if one port fails, the standby port takes over, maintaining PTP timing synchronization.
11+
12+
:FeatureName: Configuring linuxptp services as an ordinary clock with dual-port NIC redundancy
13+
include::snippets/technology-preview.adoc[leveloffset=+1]
14+
15+
.Prerequisites
16+
17+
* Install the OpenShift CLI (`oc`).
18+
* Log in as a user with `cluster-admin` privileges.
19+
* Install the PTP Operator.
20+
* The node uses an x86_64 architecture with a dual-port NIC.
21+
22+
.Procedure
23+
24+
. Create the following `PtpConfig` CR, and then save the YAML in the `oc-dual-port-ptp-config.yaml` file.
25+
+
26+
.Example PTP ordinary clock dual-port configuration
27+
[source,yaml]
28+
----
29+
apiVersion: ptp.openshift.io/v1
30+
kind: PtpConfig
31+
metadata:
32+
name: ordinary-clock-1
33+
namespace: openshift-ptp
34+
spec:
35+
profile:
36+
- name: oc-dual-port
37+
phc2sysOpts: -a -r -n 24 -N 8 -R 16 -u 0 <1>
38+
ptp4lConf: |- <2>
39+
[ens3f2]
40+
masterOnly 0
41+
[ens3f3]
42+
masterOnly 0
43+
44+
[global]
45+
#
46+
# Default Data Set
47+
#
48+
slaveOnly 1 <3>
49+
#...
50+
----
51+
<1> Specify the system config options for the `ptp4l` service.
52+
<2> Specify the interface configuration for the `ptp4l` service. In this example, setting `masterOnly 0` for the `ens3f2` and `ens3f3` interfaces enables both ports on the `ens3` interface to run as leader or follower clocks. In combination with the `slaveOnly 1` specification, this configuration ensures one port operates as the active ordinary clock, and the other port operates as a standby ordinary clock in the `Listening` port state.
53+
<3> Configures `ptp4l` to run as an ordinary clock only.
54+
55+
. Create the `PtpConfig` CR by running the following command:
56+
+
57+
[source,terminal]
58+
----
59+
$ oc create -f oc-dual-port-ptp-config.yaml
60+
----
61+
62+
.Verification
63+
64+
. Check that the `PtpConfig` profile is applied to the node.
65+
66+
.. Get the list of pods in the `openshift-ptp` namespace by running the following command:
67+
+
68+
[source,terminal]
69+
----
70+
$ oc get pods -n openshift-ptp -o wide
71+
----
72+
+
73+
.Example output
74+
[source,terminal]
75+
----
76+
NAME READY STATUS RESTARTS AGE IP NODE
77+
linuxptp-daemon-4xkbb 1/1 Running 0 43m 10.1.196.24 compute-0.example.com
78+
linuxptp-daemon-tdspf 1/1 Running 0 43m 10.1.196.25 compute-1.example.com
79+
ptp-operator-657bbb64c8-2f8sj 1/1 Running 0 43m 10.129.0.61 control-plane-1.example.com
80+
----
81+
82+
.. Check that the profile is correct. Examine the logs of the `linuxptp` daemon that corresponds to the node you specified in the `PtpConfig` profile. Run the following command:
83+
+
84+
[source,terminal]
85+
----
86+
$ oc logs linuxptp-daemon-4xkbb -n openshift-ptp -c linuxptp-daemon-container
87+
----
88+
+
89+
.Example output
90+
[source,terminal]
91+
----
92+
I1115 09:41:17.117596 4143292 daemon.go:107] in applyNodePTPProfile
93+
I1115 09:41:17.117604 4143292 daemon.go:109] updating NodePTPProfile to:
94+
I1115 09:41:17.117607 4143292 daemon.go:110] ------------------------------------
95+
I1115 09:41:17.117612 4143292 daemon.go:102] Profile Name: oc-dual-port
96+
I1115 09:41:17.117616 4143292 daemon.go:102] Interface: ens787f1
97+
I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2 --summary_interval -4
98+
I1115 09:41:17.117623 4143292 daemon.go:102] Phc2sysOpts: -a -r -n 24 -N 8 -R 16 -u 0
99+
I1115 09:41:17.117626 4143292 daemon.go:116] ------------------------------------
100+
----

modules/ptp-dual-ports-oc.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ptp/about-ptp.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="ptp-dual-ports-oc_{context}"]
7+
= Using dual-port NICs to improve redundancy for PTP ordinary clocks
8+
9+
{product-title} supports single and dual-port networking interface cards (NICs) as ordinary clocks for PTP timing. To improve redundancy, you can configure a dual-port NIC with one port as active and the other as standby.
10+
11+
:FeatureName: Configuring linuxptp services as an ordinary clock with dual-port NIC redundancy
12+
include::snippets/technology-preview.adoc[leveloffset=+1]
13+
14+
In this configuration, the ports in a dual-port NIC operate as follows:
15+
16+
* The active port functions as an ordinary clock in the `Following` port state.
17+
18+
* The standby port remains in the `Listening` port state.
19+
20+
* If the active port fails, the standby port transitions to active to ensure continued PTP timing synchronization.
21+
22+
* If both ports become faulty, the clock state moves to the `HOLDOVER` state, then the `FREERUN` state when the holdover timeout expires, before resyncing to a leader clock.
23+
24+
[NOTE]
25+
====
26+
You can configure PTP ordinary clocks with added redundancy on `x86` architecture nodes with dual-port NICs only.
27+
====

networking/ptp/about-ptp.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Before enabling PTP, ensure that NTP is disabled for the required nodes. You can
3232

3333
include::modules/ptp-dual-nics.adoc[leveloffset=+1]
3434

35+
include::modules/ptp-dual-ports-oc.adoc[leveloffset=+1]
36+
3537
include::modules/ptp-linuxptp-introduction.adoc[leveloffset=+1]
3638

3739
include::modules/ptp-overview-of-gnss-grandmaster-clock.adoc[leveloffset=+1]

networking/ptp/configuring-ptp.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,15 @@ include::modules/nw-ptp-configuring-linuxptp-services-as-ordinary-clock.adoc[lev
7373
7474
include::modules/nw-columbiaville-ptp-config-refererence.adoc[leveloffset=+2]
7575

76+
include::modules/nw-ptp-configuring-linuxptp-services-dual-port-oc.adoc[leveloffset=+2]
77+
7678
[role="_additional-resources"]
7779
.Additional resources
7880

7981
* For a complete example CR that configures `linuxptp` services as an ordinary clock with PTP fast events, see xref:../../networking/ptp/configuring-ptp.adoc#configuring-linuxptp-services-as-ordinary-clock_configuring-ptp[Configuring linuxptp services as ordinary clock].
8082
83+
* xref:../../networking/ptp/about-ptp.adoc#ptp-dual-ports-oc_about-ptp[Using dual-port NICs to improve redundancy for PTP ordinary clocks]
84+
8185
include::modules/cnf-configuring-fifo-priority-scheduling-for-ptp.adoc[leveloffset=+1]
8286

8387
include::modules/cnf-configuring-log-filtering-for-linuxptp.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)