docs/doc/source/guest_integration/kubernetes/ptp-notifications-overview.rst
Juanita-Balaraj d6ae8c5fb1 O-RAN Spec Compliant Timing API Notification
Modified PTP Status Notification Table
Added Includes file
Updated example for kubernetes deployment of the sidecar and a simulated application
Fixed formatting
Updated Patchset 1 comments
Removed override-default-application topic
Fixed Table formatting
Updated PTP Sections with modified content

Signed-off-by: Juanita-Balaraj <juanita.balaraj@windriver.com>
Change-Id: I7805615b1bbd44a541a12220b4497529cf714360
2022-12-16 15:23:04 -05:00

4.5 KiB

PTP Notifications Overview

provides ptp-notification to support applications that rely on for time synchronization and require the ability to determine if the system time is out of sync. ptp-notification provides the ability for user applications to query the sync state of hosts as well as subscribe to push notifications for changes in the sync status.

provides a Sidecar, which runs with the hosted application in the same pod and communicates with the application via a REST API.

PTP-notification consists of two main components:

  • The ptp-notification system application can be installed on nodes using clock synchronization. This monitors the various time services and provides the v1 and v2 REST API for clients to query and subscribe to.
  • The ptp-notification sidecar. This is a container image which can be configured as a sidecar and deployed alongside user applications that wish to use the ptp-notification API. User applications only need to be aware of the sidecar, making queries and subscriptions via its API. The sidecar handles locating the appropriate ptp-notification endpoints, executing the query and returning the results to the user application.

supports the following features:

  • Provides the capability to enable application(s) subscribe to status notifications and pull for the state on demand.
  • Uses a REST API to communicate notifications to the application.
  • Enables operators to install the ptp-notification-armada-app, Sidecar container, and the application supporting the REST API. For more information, see, https://docs.starlingx.io/api-ref/ptp-notification-armada-app/index.html.
  • Supports the ptp4l module and port that is configured in Subordinate mode (Secondary mode).
  • The notification Sidecar container can be configured with a Liveness Probe, if required. See, Liveness Probe <liveness-probe> for more information.

Differences between v1 and v2 REST APIs

Use of the v1 and v2 APIs is distinguished by the version identifier in the URI when interacting with the sidecar container. Both are always available. For example:

v1 API

  • /ocloudNotifications/v1/subscriptions
  • /ocloudNotifications/v2/subscriptions

The v1 API is maintained for backward compatibility with existing deployments. New deployments should use the v2 API.

v1 Limitations

  • Support for monitoring a single ptp4l instance per host - no other services can be queried/subscribed to.
  • API does not conform to the O-RAN.WG6.O-Cloud Notification API-v02.01 standard.

See the respective ptp-notification v1 and v2 document subsections for details on the behaviour.

Integrated Containerized Applications

  • Applications that rely on for synchronization have the ability to retrieve the relevant data for the status of the monitored service. User applications may subscribe to notifications from multiple service types and from multiple separate nodes.
  • Once an application subscribes to notifications it receives the initial data that shows the service state, and receives notifications when there is a state change to the sync status and/or per request for notification (pull).

The figure below describes the subscription framework for notifications.

image

Liveness Probe

The notification Sidecar container can be configured with a Liveness probe, if required. You can edit the Sidecar values in the deployment manifest to include these parameters.

Note

Port and timeout values can be configured to meet user preferences.

cat <<EOF >
items:
spec:
  template:
    spec:
      containers:
        livenessProbe:
          exec:
            command:
            - timeout
            - "2"
            - curl
            - http://127.0.0.1:8080/health
          failureThreshold: 3
          periodSeconds: 3
          successThreshold: 1
          timeoutSeconds: 3
EOF