Skip to content

Commit 2181371

Browse files
authored
Merge pull request #46129 from aireilly/td-443
[TELCODOCS-442, TELCODOCS-443] PTP 4.11 - Dual NIC and PTP events
2 parents effda34 + f39948e commit 2181371

9 files changed

+520
-223
lines changed

modules/cnf-configuring-cvl-nic-as-oc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ spec:
165165
$ oc create -f cvl-ptp-ordinary-clock.yaml
166166
----
167167

168-
.Verification steps
168+
.Verification
169169

170170
. Check that the `PtpConfig` profile is applied to the node.
171171

modules/cnf-configuring-the-ptp-fast-event-publisher.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ metadata:
2929
namespace: openshift-ptp
3030
spec:
3131
daemonNodeSelector:
32-
node-role.kubernetes.io/worker: ""
32+
node-role.kubernetes.io/worker: ""
3333
ptpEventConfig:
3434
enableEventPublisher: true <1>
3535
transportHost: amqp://<instance_name>.<namespace>.svc.cluster.local <2>

modules/cnf-fast-event-notifications-api-refererence.adoc

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,32 @@ Use the following API endpoints to subscribe the `cloud-event-consumer` DU appli
1616
* `/api/cloudNotifications/v1/subscriptions`
1717
- `POST`: Creates a new subscription
1818
- `GET`: Retrieves a list of subscriptions
19+
1920
* `/api/cloudNotifications/v1/subscriptions/<subscription_id>`
2021
- `GET`: Returns details for the specified subscription ID
22+
2123
* `api/cloudNotifications/v1/subscriptions/status/<subscription_id>`
2224
- `PUT`: Creates a new status ping request for the specified subscription ID
25+
2326
* `/api/cloudNotifications/v1/health`
2427
- `GET`: Returns the health status of `cloudNotifications` API
2528

29+
* `api/cloudNotifications/v1/publishers`
30+
- `GET`: Returns an array of `os-clock-sync-state`, `ptp-clock-class-change`, and `lock-state` messages for the cluster node
31+
2632
[NOTE]
2733
====
2834
`9089` is the default port for the `cloud-event-consumer` container deployed in the application pod. You can configure a different port for your DU application as required.
2935
====
3036

3137
== api/cloudNotifications/v1/subscriptions
3238

39+
[discrete]
3340
=== HTTP method
3441

3542
`GET api/cloudNotifications/v1/subscriptions`
3643

44+
[discrete]
3745
==== Description
3846

3947
Returns a list of subscriptions. If subscriptions exist, a `200 OK` status code is returned along with the list of subscriptions.
@@ -51,10 +59,12 @@ Returns a list of subscriptions. If subscriptions exist, a `200 OK` status code
5159
]
5260
----
5361

62+
[discrete]
5463
=== HTTP method
5564

5665
`POST api/cloudNotifications/v1/subscriptions`
5766

67+
[discrete]
5868
==== Description
5969

6070
Creates a new subscription. If a subscription is successfully created, or if it already exists, a `201 Created` status code is returned.
@@ -78,10 +88,12 @@ Creates a new subscription. If a subscription is successfully created, or if it
7888

7989
== api/cloudNotifications/v1/subscriptions/<subscription_id>
8090

91+
[discrete]
8192
=== HTTP method
8293

8394
`GET api/cloudNotifications/v1/subscriptions/<subscription_id>`
8495

96+
[discrete]
8597
==== Description
8698

8799
Returns details for the subscription with ID `<subscription_id>`
@@ -107,10 +119,12 @@ Returns details for the subscription with ID `<subscription_id>`
107119

108120
== api/cloudNotifications/v1/subscriptions/status/<subscription_id>
109121

122+
[discrete]
110123
=== HTTP method
111124

112125
`PUT api/cloudNotifications/v1/subscriptions/status/<subscription_id>`
113126

127+
[discrete]
114128
==== Description
115129

116130
Creates a new status ping request for subscription with ID `<subscription_id>`. If a subscription is present, the status request is successful and a `202 Accepted` status code is returned.
@@ -131,10 +145,12 @@ Creates a new status ping request for subscription with ID `<subscription_id>`.
131145

132146
== api/cloudNotifications/v1/health/
133147

148+
[discrete]
134149
=== HTTP method
135150

136151
`GET api/cloudNotifications/v1/health/`
137152

153+
[discrete]
138154
==== Description
139155

140156
Returns the health status for the `cloudNotifications` REST API.
@@ -144,3 +160,132 @@ Returns the health status for the `cloudNotifications` REST API.
144160
----
145161
OK
146162
----
163+
164+
== api/cloudNotifications/v1/publishers
165+
166+
[discrete]
167+
=== HTTP method
168+
169+
`GET api/cloudNotifications/v1/publishers`
170+
171+
[discrete]
172+
==== Description
173+
174+
Returns an array of `os-clock-sync-state`, `ptp-clock-class-change`, and `lock-state` details for the cluster node. The system generates notifications when the relevant equipment state changes.
175+
176+
* `os-clock-sync-state` notifications describe the host operating system clock synchronization state. Can be in `LOCKED` or `FREERUN` state.
177+
* `ptp-clock-class-change` notifications describe the current state of the PTP clock class.
178+
* `lock-state` notifications describe the current status of the PTP equipment lock state. Can be in `LOCKED`, `HOLDOVER` or `FREERUN` state.
179+
180+
.Example API response
181+
[source,json]
182+
----
183+
[
184+
{
185+
"id": "0fa415ae-a3cf-4299-876a-589438bacf75",
186+
"endpointUri": "http://localhost:9085/api/cloudNotifications/v1/dummy",
187+
"uriLocation": "http://localhost:9085/api/cloudNotifications/v1/publishers/0fa415ae-a3cf-4299-876a-589438bacf75",
188+
"resource": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state"
189+
},
190+
{
191+
"id": "28cd82df-8436-4f50-bbd9-7a9742828a71",
192+
"endpointUri": "http://localhost:9085/api/cloudNotifications/v1/dummy",
193+
"uriLocation": "http://localhost:9085/api/cloudNotifications/v1/publishers/28cd82df-8436-4f50-bbd9-7a9742828a71",
194+
"resource": "/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change"
195+
},
196+
{
197+
"id": "44aa480d-7347-48b0-a5b0-e0af01fa9677",
198+
"endpointUri": "http://localhost:9085/api/cloudNotifications/v1/dummy",
199+
"uriLocation": "http://localhost:9085/api/cloudNotifications/v1/publishers/44aa480d-7347-48b0-a5b0-e0af01fa9677",
200+
"resource": "/cluster/node/compute-1.example.com/sync/ptp-status/lock-state"
201+
}
202+
]
203+
----
204+
205+
You can find `os-clock-sync-state`, `ptp-clock-class-change` and `lock-state` events in the logs for the `cloud-event-proxy` container. For example:
206+
207+
[source,terminal]
208+
----
209+
$ oc logs -f linuxptp-daemon-cvgr6 -n openshift-ptp -c cloud-event-proxy
210+
----
211+
212+
.Example os-clock-sync-state event
213+
[source,json]
214+
----
215+
{
216+
"id":"c8a784d1-5f4a-4c16-9a81-a3b4313affe5",
217+
"type":"event.sync.sync-status.os-clock-sync-state-change",
218+
"source":"/cluster/compute-1.example.com/ptp/CLOCK_REALTIME",
219+
"dataContentType":"application/json",
220+
"time":"2022-05-06T15:31:23.906277159Z",
221+
"data":{
222+
"version":"v1",
223+
"values":[
224+
{
225+
"resource":"/sync/sync-status/os-clock-sync-state",
226+
"dataType":"notification",
227+
"valueType":"enumeration",
228+
"value":"LOCKED"
229+
},
230+
{
231+
"resource":"/sync/sync-status/os-clock-sync-state",
232+
"dataType":"metric",
233+
"valueType":"decimal64.3",
234+
"value":"-53"
235+
}
236+
]
237+
}
238+
}
239+
----
240+
241+
.Example ptp-clock-class-change event
242+
[source,json]
243+
----
244+
{
245+
"id":"69eddb52-1650-4e56-b325-86d44688d02b",
246+
"type":"event.sync.ptp-status.ptp-clock-class-change",
247+
"source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
248+
"dataContentType":"application/json",
249+
"time":"2022-05-06T15:31:23.147100033Z",
250+
"data":{
251+
"version":"v1",
252+
"values":[
253+
{
254+
"resource":"/sync/ptp-status/ptp-clock-class-change",
255+
"dataType":"metric",
256+
"valueType":"decimal64.3",
257+
"value":"135"
258+
}
259+
]
260+
}
261+
}
262+
----
263+
264+
.Example lock-state event
265+
[source,json]
266+
----
267+
{
268+
"id":"305ec18b-1472-47b3-aadd-8f37933249a9",
269+
"type":"event.sync.ptp-status.ptp-state-change",
270+
"source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
271+
"dataContentType":"application/json",
272+
"time":"2022-05-06T15:31:23.467684081Z",
273+
"data":{
274+
"version":"v1",
275+
"values":[
276+
{
277+
"resource":"/sync/ptp-status/lock-state",
278+
"dataType":"notification",
279+
"valueType":"enumeration",
280+
"value":"LOCKED"
281+
},
282+
{
283+
"resource":"/sync/ptp-status/lock-state",
284+
"dataType":"metric",
285+
"valueType":"decimal64.3",
286+
"value":"62"
287+
}
288+
]
289+
}
290+
}
291+
----
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/using-ptp.adoc
4+
5+
:_content-type: REFERENCE
6+
[id="nw-columbiaville-ptp-config-refererence_{context}"]
7+
= Intel Columbiaville E800 series NIC as PTP ordinary clock reference
8+
9+
The following table describes the changes that you must make to the reference PTP configuration in order to use Intel Columbiaville E800 series NICs as ordinary clocks. Make the changes in a `PtpConfig` custom resource (CR) that you apply to the cluster.
10+
11+
.Recommended PTP settings for Intel Columbiaville NIC
12+
[options="header"]
13+
|====
14+
|PTP configuration|Recommended setting
15+
|`phc2sysOpts`|`-a -r -m -n 24 -N 8 -R 16`
16+
|`tx_timestamp_timeout`|`50`
17+
|`boundary_clock_jbod`|`0`
18+
|====
19+
20+
21+

0 commit comments

Comments
 (0)