Skip to content

Commit eb8eb65

Browse files
committed
adding HTTP transport updates
add pv and pvc for ZTP events Jack's http transport for events comments Adding HTTP migration procedure Adding Jack's ZTP events storage adding some extra details for PTP events transport jack's comments for jack: added PVC docs updates to ZTP Aneesh: Clarify transportHost is not required to be set for HTTP transport event service and pv updates for jack jacks comments PV updates + splitting into 2 topics for HTTP/AMQP transport jack's latest comments on PTP via ZTP procedures updates for jack and tao
1 parent 40ba61b commit eb8eb65

22 files changed

+610
-216
lines changed
68.8 KB
Loading

modules/cnf-about-ptp-and-clock-synchronization.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
[id="cnf-about-ptp-and-clock-synchronization_{context}"]
77
= About PTP and clock synchronization error events
88

9-
Cloud native applications such as virtual RAN require access to notifications about hardware timing events that are critical to the functioning of the overall network. Fast event notifications are early warning signals about impending and real-time Precision Time Protocol (PTP) clock synchronization events. PTP clock synchronization errors can negatively affect the performance and reliability of your low latency application, for example, a vRAN application running in a distributed unit (DU).
10-
119
Loss of PTP synchronization is a critical error for a RAN network. If synchronization is lost on a node, the radio might be shut down and the network Over the Air (OTA) traffic might be shifted to another node in the wireless network. Fast event notifications mitigate against workload errors by allowing cluster nodes to communicate PTP clock sync status to the vRAN application running in the DU.
1210

13-
Event notifications are available to RAN applications running on the same DU node. A publish/subscribe REST API passes events notifications to the messaging bus. Publish/subscribe messaging, or pub/sub messaging, is an asynchronous service to service communication architecture where any message published to a topic is immediately received by all the subscribers to the topic.
11+
Event notifications are available to vRAN applications running on the same DU node. A publish-subscribe REST API passes events notifications to the messaging bus. Publish-subscribe messaging, or pub-sub messaging, is an asynchronous service-to-service communication architecture where any message published to a topic is immediately received by all of the subscribers to the topic.
1412

15-
Fast event notifications are generated by the PTP Operator in {product-title} for every PTP-capable network interface. The events are made available using a `cloud-event-proxy` sidecar container over an Advanced Message Queuing Protocol (AMQP) message bus. The AMQP message bus is provided by the AMQ Interconnect Operator.
13+
The PTP Operator generates fast event notifications for every PTP-capable network interface. You can access the events by using a `cloud-event-proxy` sidecar container over an HTTP or Advanced Message Queuing Protocol (AMQP) message bus.
1614

1715
[NOTE]
1816
====
1917
PTP fast event notifications are available for network interfaces configured to use PTP ordinary clocks or PTP boundary clocks.
2018
====
19+
20+
include::snippets/ptp-amq-interconnect-eol.adoc[]

modules/cnf-about-ptp-fast-event-notifications-framework.adoc

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,45 @@
88

99
Use the Precision Time Protocol (PTP) fast event notifications framework to subscribe cluster applications to PTP events that the bare-metal cluster node generates.
1010

11+
[NOTE]
12+
====
13+
The fast events notifications framework uses a REST API for communication. The REST API is based on the _O-RAN O-Cloud Notification API Specification for Event Consumers 3.0_ that is available from link:https://orandownloadsweb.azurewebsites.net/specifications[O-RAN ALLIANCE Specifications].
14+
====
15+
1116
The framework consists of a publisher, subscriber, and an AMQ or HTTP messaging protocol to handle communications between the publisher and subscriber applications.
1217
Applications run the `cloud-event-proxy` container in a sidecar pattern to subscribe to PTP events.
1318
The `cloud-event-proxy` sidecar container can access the same resources as the primary application container without using any of the resources of the primary application and with no significant latency.
1419

15-
[NOTE]
16-
====
17-
The fast events notifications framework uses a REST API for communication. The REST API is based on the _O-Cloud Notification API Specification for Event Consumers_ available from link:https://orandownloadsweb.azurewebsites.net/specifications[O-RAN ALLIANCE Specifications].
18-
====
20+
include::snippets/ptp-amq-interconnect-eol.adoc[]
1921

2022
.Overview of PTP fast events
2123
image::319_OpenShift_PTP_bare-metal_OCP_nodes_0323_4.13.png[Overview of PTP fast events]
2224

23-
--
24-
image:darkcircle-1.png[20,20]
25+
image:darkcircle-1.png[20,20] Event is generated on the cluster host::
2526
`linuxptp-daemon` in the PTP Operator-managed pod runs as a Kubernetes `DaemonSet` and manages the various `linuxptp` processes (`ptp4l`, `phc2sys`, and optionally for grandmaster clocks, `ts2phc`).
2627
The `linuxptp-daemon` passes the event to the UNIX domain socket.
2728

28-
image:darkcircle-2.png[20,20]
29+
image:darkcircle-2.png[20,20] Event is passed to the cloud-event-proxy sidecar::
2930
The PTP plugin reads the event from the UNIX domain socket and passes it to the `cloud-event-proxy` sidecar in the PTP Operator-managed pod.
3031
`cloud-event-proxy` delivers the event from the Kubernetes infrastructure to Cloud-Native Network Functions (CNFs) with low latency.
3132

32-
image:darkcircle-3.png[20,20]
33-
The `cloud-event-proxy` sidecar in the PTP Operator-managed pod persists the event and publishes the cloud native event by using a REST API.
33+
image:darkcircle-3.png[20,20] Event is persisted::
34+
The `cloud-event-proxy` sidecar in the PTP Operator-managed pod processes the event and publishes the cloud-native event by using a REST API.
35+
+
36+
[NOTE]
37+
====
38+
When you use HTTP transport for events, you must persist the events subscription in the PTP Operator-managed pod by using a Persistent Volume (PV) resource or similar persistent storage mechanism.
39+
====
3440

35-
image:darkcircle-4.png[20,20]
36-
The message is transported to the `cloud-event-proxy` sidecar in the application pod over HTTP or AMQP 1.0 QPID.
41+
image:darkcircle-4.png[20,20] Message is transported::
42+
The message transporter transports the event to the `cloud-event-proxy` sidecar in the application pod over HTTP or AMQP 1.0 QPID.
3743

38-
image:darkcircle-5.png[20,20]
44+
image:darkcircle-5.png[20,20] Event is available from the REST API::
3945
The `cloud-event-proxy` sidecar in the Application pod processes the event and makes it available by using the REST API.
4046

41-
image:darkcircle-6.png[20,20]
47+
image:darkcircle-6.png[20,20] Consumer application requests a subscription and receives the subscribed event::
4248
The consumer application sends an API request to the `cloud-event-proxy` sidecar in the application pod to create a PTP events subscription.
4349
The `cloud-event-proxy` sidecar creates an AMQ or HTTP messaging listener protocol for the resource specified in the subscription.
4450

4551
The `cloud-event-proxy` sidecar in the application pod receives the event from the PTP Operator-managed pod, unwraps the cloud events object to retrieve the data, and posts the event to the consumer application.
4652
The consumer application listens to the address specified in the resource qualifier and receives and processes the PTP event.
47-
--

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

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ To start using PTP fast event notifications for a network interface in your clus
1010

1111
.Prerequisites
1212

13-
* Install the {product-title} CLI (`oc`).
14-
* Log in as a user with `cluster-admin` privileges.
15-
* Install the PTP Operator and AMQ Interconnect Operator.
13+
* You have installed the {product-title} CLI (`oc`).
14+
15+
* You have logged in as a user with `cluster-admin` privileges.
16+
17+
* You have installed the PTP Operator.
18+
19+
* When you use HTTP events transport, configure dynamic volume provisioning in the cluster or manually create `StorageClass`, `LocalVolume`, and `PersistentVolume` resources to persist the events subscription.
20+
+
21+
[NOTE]
22+
====
23+
When you enable dynamic volume provisioning in the cluster, a `PersistentVolume` resource is automatically created for the `PersistentVolumeClaim` that the PTP Operator deploys.
24+
25+
For more information about manually creating persistent storage in the cluster, see "Persistent storage using local volumes".
26+
====
1627

1728
.Procedure
1829

@@ -32,10 +43,20 @@ spec:
3243
node-role.kubernetes.io/worker: ""
3344
ptpEventConfig:
3445
enableEventPublisher: true <1>
35-
transportHost: amqp://<instance_name>.<namespace>.svc.cluster.local <2>
46+
storageType: "example-storage-class" <2>
3647
----
3748
<1> Set `enableEventPublisher` to `true` to enable PTP fast event notifications.
38-
<2> Set `transportHost` to the AMQ router that you configured where `<instance_name>` and `<namespace>` correspond to the AMQ Interconnect router instance name and namespace, for example, `amqp://amq-interconnect.amq-interconnect.svc.cluster.local`
49+
<2> Use the value you set for `storageType` to populate the `StorageClassName` field for the `PersistentVolumeClaim` (`PVC`) resource that the PTP Operator automatically deploys.
50+
The `PVC` resource is used to persist consumer event subscriptions.
51+
+
52+
[NOTE]
53+
====
54+
In {product-title} 4.13 or later, you do not need to set the `spec.ptpEventConfig.transportHost` field in the `PtpOperatorConfig` resource when you use HTTP transport for PTP events.
55+
Set `transportHost` only when you use AMQP transport for PTP events.
56+
57+
The value that you set for `.spec.storageType` in the `PtpOperatorConfig` CR must match the `storageClassName` that is set in the `PersistentVolume` CR.
58+
If `storageType` is not set and the `transportHost` uses HTTP, the PTP daemons are not deployed.
59+
====
3960

4061
.. Update the `PtpOperatorConfig` CR:
4162
+
@@ -44,7 +65,8 @@ spec:
4465
$ oc apply -f ptp-operatorconfig.yaml
4566
----
4667

47-
. Create a `PtpConfig` custom resource (CR) for the PTP enabled interface, and set the required values for `ptpClockThreshold` and `ptp4lOpts`. The following YAML illustrates the required values that you must set in the `PtpConfig` CR:
68+
. Create a `PtpConfig` custom resource (CR) for the PTP enabled interface, and set the required values for `ptpClockThreshold` and `ptp4lOpts`.
69+
The following YAML illustrates the required values that you must set in the `PtpConfig` CR:
4870
+
4971
[source,yaml]
5072
----
@@ -62,5 +84,5 @@ spec:
6284
----
6385
<1> Append `--summary_interval -4` to use PTP fast events.
6486
<2> Required `phc2sysOpts` values. `-m` prints messages to `stdout`. The `linuxptp-daemon` `DaemonSet` parses the logs and generates Prometheus metrics.
65-
<3> Specify a string that contains the configuration to replace the default /etc/ptp4l.conf file. To use the default configuration, leave the field empty.
87+
<3> Specify a string that contains the configuration to replace the default `/etc/ptp4l.conf` file. To use the default configuration, leave the field empty.
6688
<4> Optional. If the `ptpClockThreshold` stanza is not present, default values are used for the `ptpClockThreshold` fields. The stanza shows default `ptpClockThreshold` values. The `ptpClockThreshold` values configure how long after the PTP master clock is disconnected before PTP events are triggered. `holdOverTimeout` is the time value in seconds before the PTP clock event state changes to `FREERUN` when the PTP master clock is disconnected. The `maxOffsetThreshold` and `minOffsetThreshold` settings configure offset values in nanoseconds that compare against the values for `CLOCK_REALTIME` (`phc2sys`) or master offset (`ptp4l`). When the `ptp4l` or `phc2sys` offset value is outside this range, the PTP clock state is set to `FREERUN`. When the offset value is within this range, the PTP clock state is set to `LOCKED`.

modules/cnf-installing-amq-interconnect-messaging-bus.adoc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@
66
[id="cnf-installing-amq-interconnect-messaging-bus_{context}"]
77
= Installing the AMQ messaging bus
88

9-
To pass PTP fast event notifications between publisher and subscriber on a node, you must install and configure an AMQ messaging bus to run locally on the node. You do this by installing the AMQ Interconnect Operator for use in the cluster.
9+
To pass PTP fast event notifications between publisher and subscriber on a node, you can install and configure an AMQ messaging bus to run locally on the node.
10+
To use AMQ messaging, you must install the AMQ Interconnect Operator.
11+
12+
include::snippets/ptp-amq-interconnect-eol.adoc[]
1013

1114
.Prerequisites
1215

1316
* Install the {product-title} CLI (`oc`).
17+
1418
* Log in as a user with `cluster-admin` privileges.
1519
1620
.Procedure
@@ -48,6 +52,3 @@ NAME READY STATUS RESTARTS AGE
4852
linuxptp-daemon-2t78p 3/3 Running 0 12h
4953
linuxptp-daemon-k8n88 3/3 Running 0 12h
5054
----
51-
52-
53-
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * monitoring/using-rfhe.adoc
4+
// * networking/using-ptp.adoc
5+
6+
:_content-type: PROCEDURE
7+
[id="cnf-migrating-from-amqp-to-http-transport_{context}"]
8+
= Migrating consumer applications to use HTTP transport for PTP or bare-metal events
9+
10+
If you have previously deployed PTP or bare-metal events consumer applications, you need to update the applications to use HTTP message transport.
11+
12+
.Prerequisites
13+
14+
* You have installed the OpenShift CLI (`oc`).
15+
16+
* You have logged in as a user with `cluster-admin` privileges.
17+
18+
* You have updated the PTP Operator or {redfish-operator} to version 4.13+ which uses HTTP transport by default.
19+
20+
* Configure dynamic volume provisioning in the cluster or manually create `StorageClass`, `LocalVolume`, and `PersistentVolume` resources to persist the events subscription.
21+
+
22+
[NOTE]
23+
====
24+
When dynamic volume provisioning is enabled, a `PersistentVolume` resource is automatically created for the `PersistentVolumeClaim` that the PTP Operator or {redfish-operator} deploys.
25+
====
26+
27+
.Procedure
28+
29+
. Update your events consumer application to use HTTP transport.
30+
Set the `http-event-publishers` variable for the cloud event sidecar deployment.
31+
+
32+
For example, in a cluster with PTP events configured, the following YAML snippet illustrates a cloud event sidecar deployment:
33+
+
34+
[source,yaml]
35+
----
36+
containers:
37+
- name: cloud-event-sidecar
38+
image: cloud-event-sidecar
39+
args:
40+
- "--metrics-addr=127.0.0.1:9091"
41+
- "--store-path=/store"
42+
- "--transport-host=consumer-events-subscription-service.cloud-events.svc.cluster.local:9043"
43+
- "--http-event-publishers=ptp-event-publisher-service-NODE_NAME.openshift-ptp.svc.cluster.local:9043" <1>
44+
- "--api-port=8089"
45+
----
46+
<1> The PTP Operator automatically resolves `NODE_NAME` to the host that is generating the PTP events.
47+
For example, `compute-1.example.com`.
48+
+
49+
In a cluster with bare-metal events configured, set the `http-event-publishers` field to `hw-event-publisher-service.openshift-bare-metal-events.svc.cluster.local:9043` in the cloud event sidecar deployment CR.
50+
51+
. Deploy the `consumer-events-subscription-service` service alongside the events consumer application.
52+
For example:
53+
+
54+
[source,yaml]
55+
----
56+
apiVersion: v1
57+
kind: Service
58+
metadata:
59+
annotations:
60+
prometheus.io/scrape: "true"
61+
service.alpha.openshift.io/serving-cert-secret-name: sidecar-consumer-secret
62+
name: consumer-events-subscription-service
63+
namespace: cloud-events
64+
labels:
65+
app: consumer-service
66+
spec:
67+
ports:
68+
- name: sub-port
69+
port: 9043
70+
selector:
71+
app: consumer
72+
clusterIP: None
73+
sessionAffinity: None
74+
type: ClusterIP
75+
----

modules/cnf-monitoring-fast-events-metrics-using-cli.adoc

Lines changed: 0 additions & 65 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/using-ptp.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="cnf-monitoring-fast-events-metrics_{context}"]
7+
= Monitoring PTP fast event metrics
8+
9+
You can monitor PTP fast events metrics from cluster nodes where the `linuxptp-daemon` is running.
10+
You can also monitor PTP fast event metrics in the {product-title} web console by using the pre-configured and self-updating Prometheus monitoring stack.
11+
12+
.Prerequisites
13+
14+
* Install the {product-title} CLI `oc`.
15+
16+
* Log in as a user with `cluster-admin` privileges.
17+
18+
* Install and configure the PTP Operator on a node with PTP-capable hardware.
19+
20+
.Procedure
21+
22+
. Check for exposed PTP metrics on any node where the `linuxptp-daemon` is running. For example, run the following command:
23+
+
24+
[source,terminal]
25+
----
26+
$ curl http://<node_name>:9091/metrics
27+
----
28+
+
29+
.Example output
30+
----
31+
# HELP openshift_ptp_clock_state 0 = FREERUN, 1 = LOCKED, 2 = HOLDOVER
32+
# TYPE openshift_ptp_clock_state gauge
33+
openshift_ptp_clock_state{iface="ens1fx",node="compute-1.example.com",process="ptp4l"} 1
34+
openshift_ptp_clock_state{iface="ens3fx",node="compute-1.example.com",process="ptp4l"} 1
35+
openshift_ptp_clock_state{iface="ens5fx",node="compute-1.example.com",process="ptp4l"} 1
36+
openshift_ptp_clock_state{iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 1
37+
# HELP openshift_ptp_delay_ns
38+
# TYPE openshift_ptp_delay_ns gauge
39+
openshift_ptp_delay_ns{from="master",iface="ens1fx",node="compute-1.example.com",process="ptp4l"} 842
40+
openshift_ptp_delay_ns{from="master",iface="ens3fx",node="compute-1.example.com",process="ptp4l"} 480
41+
openshift_ptp_delay_ns{from="master",iface="ens5fx",node="compute-1.example.com",process="ptp4l"} 584
42+
openshift_ptp_delay_ns{from="master",iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 482
43+
openshift_ptp_delay_ns{from="phc",iface="CLOCK_REALTIME",node="compute-1.example.com",process="phc2sys"} 547
44+
# HELP openshift_ptp_offset_ns
45+
# TYPE openshift_ptp_offset_ns gauge
46+
openshift_ptp_offset_ns{from="master",iface="ens1fx",node="compute-1.example.com",process="ptp4l"} -2
47+
openshift_ptp_offset_ns{from="master",iface="ens3fx",node="compute-1.example.com",process="ptp4l"} -44
48+
openshift_ptp_offset_ns{from="master",iface="ens5fx",node="compute-1.example.com",process="ptp4l"} -8
49+
openshift_ptp_offset_ns{from="master",iface="ens7fx",node="compute-1.example.com",process="ptp4l"} 3
50+
openshift_ptp_offset_ns{from="phc",iface="CLOCK_REALTIME",node="compute-1.example.com",process="phc2sys"} 12
51+
----
52+
53+
. To view the PTP event in the {product-title} web console, copy the name of the PTP metric you want to query, for example, `openshift_ptp_offset_ns`.
54+
55+
. In the {product-title} web console, click *Observe* -> *Metrics*.
56+
57+
. Paste the PTP metric name into the *Expression* field, and click *Run queries*.

0 commit comments

Comments
 (0)