검색

18.3. PTP 하드웨어 빠른 이벤트 알림 프레임워크 사용

download PDF

vRAN(가상 RAN)과 같은 클라우드 네이티브 애플리케이션에서는 전체 네트워크의 작동에 중요한 하드웨어 타이밍 이벤트에 대한 알림에 액세스해야 합니다. PTP(Precision Time Protocol) 클럭 동기화 오류는 대기 시간이 짧은 애플리케이션의 성능과 안정성(예: 분산 단위(DU)에서 실행되는 vRAN 애플리케이션)에 부정적인 영향을 미칠 수 있습니다.

18.3.1. PTP 및 클럭 동기화 오류 이벤트 정보

PTP 동기화 손실은 RAN 네트워크에 심각한 오류입니다. 노드에서 동기화가 손실된 경우 라디오가 종료될 수 있으며 네트워크 Over the Air (OTA) 트래픽이 무선 네트워크의 다른 노드로 이동될 수 있습니다. 클러스터 노드에서 PTP 클럭 동기화 상태를 DU에서 실행 중인 vRAN 애플리케이션에 통신할 수 있도록 함으로써 이벤트 알림이 워크로드 오류와 비교하여 완화됩니다.

이벤트 알림은 동일한 DU 노드에서 실행되는 vRAN 애플리케이션에서 사용할 수 있습니다. 게시/서브스크립션 REST API는 이벤트 알림을 메시징 버스에 전달합니다. 게시/서브스크립션 메시징 또는 pub-sub 메시징은 주제에 게시된 모든 메시지가 주제에 대한 모든 구독자에 의해 즉시 수신되는 비동기 서비스 간 통신 아키텍처입니다.

PTP Operator는 모든 PTP 가능 네트워크 인터페이스에 대한 빠른 이벤트 알림을 생성합니다. HTTP 또는 AMQP(Advanced Message Queuing Protocol) 메시지 버스를 통해 cloud-event-proxy 사이드카 컨테이너를 사용하여 이벤트에 액세스할 수 있습니다.

참고

PTP 빠른 이벤트 알림은 PTP 일반 클럭, PTP 할 마스터 클록 또는 PTP 경계 클록을 사용하도록 구성된 네트워크 인터페이스에 사용할 수 있습니다.

참고

HTTP 전송은 PTP 및 베어 메탈 이벤트의 기본 전송입니다. 가능한 경우 PTP 및 베어 메탈 이벤트에 AMQP 대신 HTTP 전송을 사용합니다. AMQ Interconnect는 2024년 6월 30일부터 EOL입니다. AMQ Interconnect의 ELS(Extended Life Cycle Support)는 2029년 11월 29일에 종료됩니다. 자세한 내용은 Red Hat AMQ Interconnect 지원 상태를 참조하십시오.

18.3.2. PTP 빠른 이벤트 알림 프레임워크 정보

PTP(Precision Time Protocol) 빠른 이벤트 알림 프레임워크를 사용하여 베어 메탈 클러스터 노드에서 생성하는 PTP 이벤트에 클러스터 애플리케이션을 서브스크립션합니다.

참고

빠른 이벤트 알림 프레임워크는 통신에 REST API를 사용합니다. REST API는 O-RAN ALLIANCE 사양에서 사용할 수 있는 이벤트 소비자 3.0의 O-RAN O-Cloud 알림 API 사양 을 기반으로 합니다.

프레임워크는 게시자 및 구독자 애플리케이션 간의 통신을 처리하는 게시자, 구독자 및 AMQ 또는 HTTP 메시징 프로토콜로 구성됩니다. 애플리케이션은 사이드카 패턴에서 cloud-event-proxy 컨테이너를 실행하여 PTP 이벤트를 구독합니다. cloud-event-proxy 사이드카 컨테이너는 기본 애플리케이션의 리소스를 사용하지 않고 대기 시간 없이 기본 애플리케이션 컨테이너와 동일한 리소스에 액세스할 수 있습니다.

참고

HTTP 전송은 PTP 및 베어 메탈 이벤트의 기본 전송입니다. 가능한 경우 PTP 및 베어 메탈 이벤트에 AMQP 대신 HTTP 전송을 사용합니다. AMQ Interconnect는 2024년 6월 30일부터 EOL입니다. AMQ Interconnect의 ELS(Extended Life Cycle Support)는 2029년 11월 29일에 종료됩니다. 자세한 내용은 Red Hat AMQ Interconnect 지원 상태를 참조하십시오.

그림 18.4. PTP 빠른 이벤트 개요

PTP 빠른 이벤트 개요
20 클러스터 호스트에서 이벤트가 생성됩니다.
PTP Operator 관리 Pod의 linuxptp-daemon 은 Kubernetes DaemonSet 로 실행되며 다양한 linuxptp 프로세스(ptp4l,phc2sys, 선택적으로 할 마스터 클록, ts2phc)를 관리합니다. linuxptp-daemon 은 이벤트를 UNIX 도메인 소켓에 전달합니다.
20 이벤트는 cloud-event-proxy 사이드카에 전달됩니다.
PTP 플러그인은 UNIX 도메인 소켓에서 이벤트를 읽고 PTP Operator 관리 Pod의 cloud-event-proxy 사이드카에 전달합니다. cloud-event-proxy 는 Kubernetes 인프라에서 대기 시간이 짧은 CNF(Cloud-Native Network Functions)로 이벤트를 제공합니다.
20 이벤트가 유지됩니다.
PTP Operator 관리 Pod의 cloud-event-proxy 사이드카는 이벤트를 처리하고 REST API를 사용하여 클라우드 네이티브 이벤트를 게시합니다.
20 메시지가 전송됨
메시지 전송자는 HTTP 또는 AMQP 1.0 QPID를 통해 애플리케이션 Pod의 cloud-event-proxy 사이드카로 이벤트를 전송합니다.
20 REST API에서 이벤트 사용 가능
애플리케이션 Pod의 cloud-event-proxy 사이드카는 이벤트를 처리하고 REST API를 사용하여 이벤트를 사용할 수 있도록 합니다.
20 소비자 애플리케이션은 서브스크립션을 요청하고 서브스크립션 이벤트를 수신
소비자 애플리케이션은 API 요청을 애플리케이션 Pod의 cloud-event-proxy 사이드카로 전송하여 PTP 이벤트 서브스크립션을 생성합니다. cloud-event-proxy 사이드카는 서브스크립션에 지정된 리소스에 대한 AMQ 또는 HTTP 메시징 리스너 프로토콜을 생성합니다.

애플리케이션 Pod의 cloud-event-proxy 사이드카는 PTP Operator 관리 Pod에서 이벤트를 수신하고 클라우드 이벤트 오브젝트를 래핑하여 데이터를 검색하고 이벤트를 소비자 애플리케이션에 게시합니다. 소비자 애플리케이션은 리소스 한정자에 지정된 주소를 수신하고 PTP 이벤트를 수신하고 처리합니다.

18.3.3. PTP 빠른 이벤트 알림 게시자 구성

클러스터에서 네트워크 인터페이스에 PTP 빠른 이벤트 알림을 사용하려면 PTP Operator PtpOperatorConfig CR(사용자 정의 리소스)에서 빠른 이벤트 게시자를 활성화하고 생성한 PtpConfig CR에서 ptpClockThreshold 값을 구성해야 합니다.

사전 요구 사항

  • OpenShift Container Platform CLI(oc)를 설치했습니다.
  • cluster-admin 권한이 있는 사용자로 로그인했습니다.
  • PTP Operator를 설치했습니다.

프로세스

  1. 기본 PTP Operator 구성을 수정하여 PTP 빠른 이벤트를 활성화합니다.

    1. 다음 YAML을 ptp-operatorconfig.yaml 파일에 저장합니다.

      apiVersion: ptp.openshift.io/v1
      kind: PtpOperatorConfig
      metadata:
        name: default
        namespace: openshift-ptp
      spec:
        daemonNodeSelector:
          node-role.kubernetes.io/worker: ""
        ptpEventConfig:
          enableEventPublisher: true 1
      1
      enableEventPublishertrue로 설정하여 PTP 빠른 이벤트 알림을 활성화합니다.
    참고

    OpenShift Container Platform 4.13 이상에서는 PTP 이벤트에 HTTP 전송을 사용할 때 PtpOperatorConfig 리소스에서 spec.ptpEventConfig.transportHost 필드를 설정할 필요가 없습니다. PTP 이벤트에 AMQP 전송을 사용하는 경우에만 transportHost 를 설정합니다.

    1. PtpOperatorConfig CR을 업데이트합니다.

      $ oc apply -f ptp-operatorconfig.yaml
  2. PTP가 활성화된 인터페이스에 대한 PtpConfig CR(사용자 정의 리소스)을 생성하고 ptpClockThresholdptp4lOpts 에 필요한 값을 설정합니다. 다음 YAML은 PtpConfig CR에 설정해야 하는 필수 값을 보여줍니다.

    spec:
      profile:
      - name: "profile1"
        interface: "enp5s0f0"
        ptp4lOpts: "-2 -s --summary_interval -4" 1
        phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" 2
        ptp4lConf: "" 3
        ptpClockThreshold: 4
          holdOverTimeout: 5
          maxOffsetThreshold: 100
          minOffsetThreshold: -100
    1
    PTP 빠른 이벤트를 사용하려면 --summary_interval -4 를 추가합니다.
    2
    필수 phc2sysOpts 값. -m 은 메시지를 stdout 에 출력합니다. linuxptp-daemon DaemonSet 은 로그를 구문 분석하고 Prometheus 지표를 생성합니다.
    3
    기본 /etc/ptp4l.conf 파일을 대체할 구성이 포함된 문자열을 지정합니다. 기본 구성을 사용하려면 필드를 비워 둡니다.
    4
    선택 사항: ptpClockThreshold 스탠자가 없으면 ptpClockThreshold 필드에 기본값이 사용됩니다. 스탠자는 기본 ptpClockThreshold 값을 표시합니다. ptpClockThreshold 값은 PTP 이벤트가 트리거되기 전에 PTP 마스터 클록의 연결이 해제된 후의 시간을 구성합니다. holdOverTimeout 은 PTP 마스터 클록의 연결이 끊어지면 PTP 클럭 이벤트 상태가 Free RUN 으로 변경되기 전의 시간(초)입니다. maxOffsetThresholdminOffsetThreshold 설정은 CLOCK_REALTIME (phc2sys) 또는 master 오프셋(ptp4l)의 값과 비교하는 오프셋 값을 나노초로 구성합니다. ptp4l 또는 phc2sys 오프셋 값이 이 범위를 벗어나는 경우 PTP 클럭 상태가 Free RUN으로 설정됩니다. 오프셋 값이 이 범위 내에 있으면 PTP 클럭 상태가 LOCKED 로 설정됩니다.

추가 리소스

18.3.4. PTP 또는 베어 메탈 이벤트에 HTTP 전송을 사용하도록 소비자 애플리케이션 마이그레이션

이전에 PTP 또는 베어 메탈 이벤트 소비자 애플리케이션을 배포한 경우 HTTP 메시지 전송을 사용하도록 애플리케이션을 업데이트해야 합니다.

사전 요구 사항

  • OpenShift CLI(oc)가 설치되어 있습니다.
  • cluster-admin 권한이 있는 사용자로 로그인했습니다.
  • PTP Operator 또는 Bare Metal Event Relay를 기본적으로 HTTP 전송을 사용하는 버전 4.13 이상으로 업데이트했습니다.

프로세스

  1. HTTP 전송을 사용하도록 이벤트 소비자 애플리케이션을 업데이트합니다. 클라우드 이벤트 사이드카 배포에 대한 http-event-publishers 변수를 설정합니다.

    예를 들어 PTP 이벤트가 구성된 클러스터에서 다음 YAML 스니펫에서는 클라우드 이벤트 사이드카 배포를 보여줍니다.

    containers:
      - name: cloud-event-sidecar
        image: cloud-event-sidecar
        args:
          - "--metrics-addr=127.0.0.1:9091"
          - "--store-path=/store"
          - "--transport-host=consumer-events-subscription-service.cloud-events.svc.cluster.local:9043"
          - "--http-event-publishers=ptp-event-publisher-service-NODE_NAME.openshift-ptp.svc.cluster.local:9043" 1
          - "--api-port=8089"
    1
    PTP Operator는 NODE_NAME 을 PTP 이벤트를 생성하는 호스트로 자동으로 해결합니다. 예를 들면 compute-1.example.com 입니다.

    베어 메탈 이벤트가 구성된 클러스터에서 클라우드 이벤트 사이드카 배포 CR에서 http-event-publishers 필드를 hw-event-publisher-service.openshift-bare-metal-events.svc.cluster.local:9043 으로 설정합니다.

  2. 이벤트 소비자 애플리케이션과 함께 consumer-events-subscription-service 서비스를 배포합니다. 예를 들면 다음과 같습니다.

    apiVersion: v1
    kind: Service
    metadata:
      annotations:
        prometheus.io/scrape: "true"
        service.alpha.openshift.io/serving-cert-secret-name: sidecar-consumer-secret
      name: consumer-events-subscription-service
      namespace: cloud-events
      labels:
        app: consumer-service
    spec:
      ports:
        - name: sub-port
          port: 9043
      selector:
        app: consumer
      clusterIP: None
      sessionAffinity: None
      type: ClusterIP

18.3.5. AMQ 메시징 버스 설치

노드에서 게시자와 구독자 간에 PTP 빠른 이벤트 알림을 전달하려면 노드에서 로컬로 실행되도록 AMQ 메시징 버스를 설치하고 구성할 수 있습니다. AMQ 메시징을 사용하려면 AMQ Interconnect Operator를 설치해야 합니다. :_mod-docs-content-type: SNIPPET

참고

HTTP 전송은 PTP 및 베어 메탈 이벤트의 기본 전송입니다. 가능한 경우 PTP 및 베어 메탈 이벤트에 AMQP 대신 HTTP 전송을 사용합니다. AMQ Interconnect는 2024년 6월 30일부터 EOL입니다. AMQ Interconnect의 ELS(Extended Life Cycle Support)는 2029년 11월 29일에 종료됩니다. 자세한 내용은 Red Hat AMQ Interconnect 지원 상태를 참조하십시오.

사전 요구 사항

  • cluster-admin 권한이 있는 사용자로 로그인합니다.

프로세스

검증

  1. AMQ Interconnect Operator를 사용할 수 있고 필요한 Pod가 실행 중인지 확인합니다.

    $ oc get pods -n amq-interconnect

    출력 예

    NAME                                    READY   STATUS    RESTARTS   AGE
    amq-interconnect-645db76c76-k8ghs       1/1     Running   0          23h
    interconnect-operator-5cb5fc7cc-4v7qm   1/1     Running   0          23h

  2. 필수 linuxptp-daemon PTP 이벤트 생산자 Pod가 openshift-ptp 네임스페이스에서 실행되고 있는지 확인합니다.

    $ oc get pods -n openshift-ptp

    출력 예

    NAME                     READY   STATUS    RESTARTS       AGE
    linuxptp-daemon-2t78p    3/3     Running   0              12h
    linuxptp-daemon-k8n88    3/3     Running   0              12h

18.3.6. REST API를 사용하여 DU 애플리케이션을 PTP 이벤트에 구독

리소스 주소 /cluster/node/<node_name>/ptp 를 사용하여 애플리케이션을 PTP 이벤트에 구독합니다. 여기서 < node_name >은 DU 애플리케이션을 실행하는 클러스터 노드입니다.

별도의 DU 애플리케이션 Pod에 cloud-event-consumer DU 애플리케이션 컨테이너 및 cloud-event-proxy 사이드카 컨테이너를 배포합니다. cloud-event-consumer DU 애플리케이션은 애플리케이션 Pod의 cloud-event-proxy 컨테이너를 서브스크립션합니다.

다음 API 끝점을 사용하여 DU 애플리케이션 Pod의 http://localhost:8089/api/ocloudNotifications/v1/ 에서 cloud-event- consumer DU 애플리케이션을 게시한 PTP 이벤트에 등록합니다.

참고

9089 는 애플리케이션 Pod에 배포된 cloud-event-consumer 컨테이너의 기본 포트입니다. 필요에 따라 DU 애플리케이션에 대해 다른 포트를 구성할 수 있습니다.

18.3.6.1. PTP 이벤트 REST API 참조

PTP 이벤트 알림 REST API를 사용하여 클러스터 애플리케이션을 상위 노드에서 생성된 PTP 이벤트에 서브스크립션합니다.

18.3.6.1.1. api/ocloudNotifications/v1/subscriptions
HTTP 방법

GET api/ocloudNotifications/v1/subscriptions

설명

서브스크립션 목록을 반환합니다. 서브스크립션이 존재하는 경우 200 OK 상태 코드가 서브스크립션 목록과 함께 반환됩니다.

API 응답 예

[
 {
  "id": "75b1ad8f-c807-4c23-acf5-56f4b7ee3826",
  "endpointUri": "http://localhost:9089/event",
  "uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions/75b1ad8f-c807-4c23-acf5-56f4b7ee3826",
  "resource": "/cluster/node/compute-1.example.com/ptp"
 }
]

HTTP 방법

POST api/ocloudNotifications/v1/subscriptions

설명

새 서브스크립션을 생성합니다. 서브스크립션이 성공적으로 생성되었거나 이미 존재하는 경우 201 Created 상태 코드가 반환됩니다.

표 18.12. 쿼리 매개변수
매개변수유형

subscription

data

페이로드 예

{
  "uriLocation": "http://localhost:8089/api/ocloudNotifications/v1/subscriptions",
  "resource": "/cluster/node/compute-1.example.com/ptp"
}

HTTP 방법

DELETE api/ocloudNotifications/v1/subscriptions

설명

모든 서브스크립션을 삭제합니다.

API 응답 예

{
"status": "deleted all subscriptions"
}

18.3.6.1.2. api/ocloudNotifications/v1/subscriptions/{subscription_id}
HTTP 방법

GET api/ocloudNotifications/v1/subscriptions/{subscription_id}

설명

ID subscription_id 가 있는 서브스크립션 세부 정보를 반환합니다.

표 18.13. 글로벌 경로 매개변수
매개변수유형

subscription_id

string

API 응답 예

{
  "id":"48210fb3-45be-4ce0-aa9b-41a0e58730ab",
  "endpointUri": "http://localhost:9089/event",
  "uriLocation":"http://localhost:8089/api/ocloudNotifications/v1/subscriptions/48210fb3-45be-4ce0-aa9b-41a0e58730ab",
  "resource":"/cluster/node/compute-1.example.com/ptp"
}

HTTP 방법

DELETE api/ocloudNotifications/v1/subscriptions/{subscription_id}

설명

ID subscription_id 가 있는 서브스크립션을 삭제합니다.

표 18.14. 글로벌 경로 매개변수
매개변수유형

subscription_id

string

API 응답 예

{
"status": "OK"
}

18.3.6.1.3. api/ocloudNotifications/v1/health
HTTP 방법

GET api/ocloudNotifications/v1/health/

설명

ocloudNotifications REST API의 상태를 반환합니다.

API 응답 예

OK

18.3.6.1.4. api/ocloudNotifications/v1/publishers
HTTP 방법

GET api/ocloudNotifications/v1/publishers

설명

클러스터 노드에 대한 os-clock-sync-state,ptp-clock-class-change,lock-state, gnss-sync-status 세부 정보 배열을 반환합니다. 관련 장비 상태가 변경될 때 시스템에서 알림을 생성합니다.

  • OS-clock-sync-state 알림은 호스트 운영 체제 클럭 동기화 상태를 설명합니다. LOCKED 또는 Free RUN 상태일 수 있습니다.
  • PTP-clock-class-change 알림은 PTP 클럭 클래스의 현재 상태를 설명합니다.
  • 잠금 상태 알림은 PTP 장비 잠금 상태의 현재 상태를 설명합니다. LOCKED,HOLDOVER 또는 Free RUN 상태일 수 있습니다.
  • GNSS -sync-status 알림은 외부 GNSS 클록 신호와 관련된 GPS 동기화 상태를 설명합니다. LOCKED 또는 Free RUN 상태일 수 있습니다.

장비 동기화 상태 서브스크립션을 함께 사용하여 시스템의 전체 동기화 상태에 대한 자세한 보기를 제공할 수 있습니다.

API 응답 예

[
  {
    "id": "0fa415ae-a3cf-4299-876a-589438bacf75",
    "endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
    "uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/0fa415ae-a3cf-4299-876a-589438bacf75",
    "resource": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state"
  },
  {
    "id": "28cd82df-8436-4f50-bbd9-7a9742828a71",
    "endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
    "uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/28cd82df-8436-4f50-bbd9-7a9742828a71",
    "resource": "/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change"
  },
  {
    "id": "44aa480d-7347-48b0-a5b0-e0af01fa9677",
    "endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
    "uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/44aa480d-7347-48b0-a5b0-e0af01fa9677",
    "resource": "/cluster/node/compute-1.example.com/sync/ptp-status/lock-state"
  },
  {
    "id": "778da345d-4567-67b0-a43f0-rty885a456",
    "endpointUri": "http://localhost:9085/api/ocloudNotifications/v1/dummy",
    "uriLocation": "http://localhost:9085/api/ocloudNotifications/v1/publishers/778da345d-4567-67b0-a43f0-rty885a456",
    "resource": "/cluster/node/compute-1.example.com/sync/gnss-status/gnss-sync-status"
  }
]

cloud-event-proxy 컨테이너의 로그에서 os-clock-sync-state,ptp-clock-class-change,lock-state, gnss-sync-status 이벤트를 찾을 수 있습니다. 예를 들면 다음과 같습니다.

$ oc logs -f linuxptp-daemon-cvgr6 -n openshift-ptp -c cloud-event-proxy

os-clock-sync-state 이벤트의 예

{
   "id":"c8a784d1-5f4a-4c16-9a81-a3b4313affe5",
   "type":"event.sync.sync-status.os-clock-sync-state-change",
   "source":"/cluster/compute-1.example.com/ptp/CLOCK_REALTIME",
   "dataContentType":"application/json",
   "time":"2022-05-06T15:31:23.906277159Z",
   "data":{
      "version":"v1",
      "values":[
         {
            "resource":"/sync/sync-status/os-clock-sync-state",
            "dataType":"notification",
            "valueType":"enumeration",
            "value":"LOCKED"
         },
         {
            "resource":"/sync/sync-status/os-clock-sync-state",
            "dataType":"metric",
            "valueType":"decimal64.3",
            "value":"-53"
         }
      ]
   }
}

ptp-clock-class-change 이벤트의 예

{
   "id":"69eddb52-1650-4e56-b325-86d44688d02b",
   "type":"event.sync.ptp-status.ptp-clock-class-change",
   "source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
   "dataContentType":"application/json",
   "time":"2022-05-06T15:31:23.147100033Z",
   "data":{
      "version":"v1",
      "values":[
         {
            "resource":"/sync/ptp-status/ptp-clock-class-change",
            "dataType":"metric",
            "valueType":"decimal64.3",
            "value":"135"
         }
      ]
   }
}

lock-state 이벤트의 예

{
   "id":"305ec18b-1472-47b3-aadd-8f37933249a9",
   "type":"event.sync.ptp-status.ptp-state-change",
   "source":"/cluster/compute-1.example.com/ptp/ens2fx/master",
   "dataContentType":"application/json",
   "time":"2022-05-06T15:31:23.467684081Z",
   "data":{
      "version":"v1",
      "values":[
         {
            "resource":"/sync/ptp-status/lock-state",
            "dataType":"notification",
            "valueType":"enumeration",
            "value":"LOCKED"
         },
         {
            "resource":"/sync/ptp-status/lock-state",
            "dataType":"metric",
            "valueType":"decimal64.3",
            "value":"62"
         }
      ]
   }
}

gnss-sync-status 이벤트의 예

{
  "id": "435e1f2a-6854-4555-8520-767325c087d7",
  "type": "event.sync.gnss-status.gnss-state-change",
  "source": "/cluster/node/compute-1.example.com/sync/gnss-status/gnss-sync-status",
  "dataContentType": "application/json",
  "time": "2023-09-27T19:35:33.42347206Z",
  "data": {
    "version": "v1",
    "values": [
      {
        "resource": "/cluster/node/compute-1.example.com/ens2fx/master",
        "dataType": "notification",
        "valueType": "enumeration",
        "value": "LOCKED"
      },
      {
        "resource": "/cluster/node/compute-1.example.com/ens2fx/master",
        "dataType": "metric",
        "valueType": "decimal64.3",
        "value": "5"
      }
    ]
  }
}

18.3.6.1.5. api/ocloudNotifications/v1/{resource_address}/CurrentState
HTTP 방법

GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/ptp-status/lock-state/CurrentState

GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/sync-status/os-clock-sync-state/CurrentState

GET api/ocloudNotifications/v1/cluster/node/<node_name>/sync/ptp-status/ptp-clock-class-change/CurrentState

설명

클러스터 노드에 대한 os-clock-sync-state,ptp-clock-class-change,lock-state 이벤트의 현재 상태를 반환하도록 CurrentState API 끝점을 구성합니다.

  • OS-clock-sync-state 알림은 호스트 운영 체제 클럭 동기화 상태를 설명합니다. LOCKED 또는 Free RUN 상태일 수 있습니다.
  • PTP-clock-class-change 알림은 PTP 클럭 클래스의 현재 상태를 설명합니다.
  • 잠금 상태 알림은 PTP 장비 잠금 상태의 현재 상태를 설명합니다. LOCKED,HOLDOVER 또는 Free RUN 상태일 수 있습니다.
표 18.15. 글로벌 경로 매개변수
매개변수유형

resource_address

string

lock-state API 응답의 예

{
  "id": "c1ac3aa5-1195-4786-84f8-da0ea4462921",
  "type": "event.sync.ptp-status.ptp-state-change",
  "source": "/cluster/node/compute-1.example.com/sync/ptp-status/lock-state",
  "dataContentType": "application/json",
  "time": "2023-01-10T02:41:57.094981478Z",
  "data": {
    "version": "v1",
    "values": [
      {
        "resource": "/cluster/node/compute-1.example.com/ens5fx/master",
        "dataType": "notification",
        "valueType": "enumeration",
        "value": "LOCKED"
      },
      {
        "resource": "/cluster/node/compute-1.example.com/ens5fx/master",
        "dataType": "metric",
        "valueType": "decimal64.3",
        "value": "29"
      }
    ]
  }
}

os-clock-sync-state API 응답의 예

{
  "specversion": "0.3",
  "id": "4f51fe99-feaa-4e66-9112-66c5c9b9afcb",
  "source": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",
  "type": "event.sync.sync-status.os-clock-sync-state-change",
  "subject": "/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",
  "datacontenttype": "application/json",
  "time": "2022-11-29T17:44:22.202Z",
  "data": {
    "version": "v1",
    "values": [
      {
        "resource": "/cluster/node/compute-1.example.com/CLOCK_REALTIME",
        "dataType": "notification",
        "valueType": "enumeration",
        "value": "LOCKED"
      },
      {
        "resource": "/cluster/node/compute-1.example.com/CLOCK_REALTIME",
        "dataType": "metric",
        "valueType": "decimal64.3",
        "value": "27"
      }
    ]
  }
}

ptp-clock-class-change API 응답의 예

{
  "id": "064c9e67-5ad4-4afb-98ff-189c6aa9c205",
  "type": "event.sync.ptp-status.ptp-clock-class-change",
  "source": "/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change",
  "dataContentType": "application/json",
  "time": "2023-01-10T02:41:56.785673989Z",
  "data": {
    "version": "v1",
    "values": [
      {
        "resource": "/cluster/node/compute-1.example.com/ens5fx/master",
        "dataType": "metric",
        "valueType": "decimal64.3",
        "value": "165"
      }
    ]
  }
}

18.3.7. PTP 빠른 이벤트 메트릭 모니터링

linuxptp-daemon 이 실행 중인 클러스터 노드에서 PTP 빠른 이벤트 메트릭을 모니터링할 수 있습니다. 사전 구성 및 자체 업데이트 Prometheus 모니터링 스택을 사용하여 OpenShift Container Platform 웹 콘솔에서 PTP 빠른 이벤트 메트릭을 모니터링할 수도 있습니다.

사전 요구 사항

  • OpenShift Container Platform CLI oc를 설치합니다.
  • cluster-admin 권한이 있는 사용자로 로그인합니다.
  • PTP 가능 하드웨어를 사용하여 노드에 PTP Operator를 설치하고 구성합니다.

프로세스

  1. 다음 명령을 실행하여 노드의 디버그 Pod를 시작합니다.

    $ oc debug node/<node_name>
  2. linuxptp-daemon 컨테이너에서 노출하는 PTP 메트릭을 확인합니다. 예를 들어 다음 명령을 실행합니다.

    sh-4.4# curl http://localhost:9091/metrics

    출력 예

    # HELP cne_api_events_published Metric to get number of events published by the rest api
    # TYPE cne_api_events_published gauge
    cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/gnss-status/gnss-sync-status",status="success"} 1
    cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/ptp-status/lock-state",status="success"} 94
    cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/ptp-status/ptp-clock-class-change",status="success"} 18
    cne_api_events_published{address="/cluster/node/compute-1.example.com/sync/sync-status/os-clock-sync-state",status="success"} 27

  3. OpenShift Container Platform 웹 콘솔에서 PTP 이벤트를 보려면 쿼리할 PTP 지표의 이름을 복사합니다(예: openshift_ptp_offset_ns ).
  4. OpenShift Container Platform 웹 콘솔에서 모니터링 메트릭을 클릭합니다.
  5. PTP 메트릭 이름을 표현식 필드에 붙여넣고 쿼리 실행을 클릭합니다.

추가 리소스

18.3.8. PTP 빠른 이벤트 메트릭 참조

다음 표는 linuxptp-daemon 서비스가 실행 중인 클러스터 노드에서 사용할 수 있는 PTP 빠른 이벤트 메트릭을 설명합니다.

표 18.16. PTP 빠른 이벤트 메트릭
지표설명예제

openshift_ptp_clock_class

인터페이스의 PTP 클럭 클래스를 반환합니다. PTP 클럭 클래스에 대한 가능한 값은 6 (LOCKED), 7 (PRC UNLOCKED IN-SPEC), 52 (PRC UNLOCKED OUT-OF-SPEC), 187 (PRC UNLOCKED OUT-OF-SPEC), 135 (T-BC HOLDOVER IN-SPEC)입니다. 165 (t-BC HOLDOVER OUT-OF-SPEC), 248 (DEFAULT), 255 (SLAVE ONLY CLOCK)

{node="compute-1.example.com",process="ptp4l"} 6

openshift_ptp_clock_state

인터페이스의 현재 PTP 클럭 상태를 반환합니다. PTP 클럭 상태에 사용 가능한 값은 free RUN,LOCKED 또는 HOLDOVER 입니다.

{iface="CLOCK_REALTIME", node="compute-1.example.com", process="phc2sys"} 1

openshift_ptp_delay_ns

타이밍 패킷을 전송하는 기본 클록과 타이밍 패킷을 수신하는 보조 클럭 사이의 지연 나노초를 반환합니다.

{from="master", iface="ens2fx", node="compute-1.example.com", process="ts2phc"} 0

openshift_ptp_ha_profile_status

다른 NIC에 여러 시간 소스가 있는 경우 고가용성 시스템 클록의 현재 상태를 반환합니다. 가능한 값은 0(ACTIVE) 및 1(ACTIVE)입니다.

{node="node1",process="phc2sys",profile="profile1"} 1{node="node1",process="phc2sys",profile2"} 0

openshift_ptp_frequency_adjustment_ns

2 PTP 클록 사이의 나노초 단위로 빈도 조정을 반환합니다. 예를 들어, 시스템 클럭과 NIC 사이의 업스트림 클럭과 NIC 사이 또는 PTP 하드웨어 클록 (phc)과 NIC 사이입니다.

{from="phc", iface="CLOCK_REALTIME", node="compute-1.example.com", process="phc2sys"} -6768

openshift_ptp_interface_role

인터페이스에 대해 구성된 PTP 클럭 역할을 반환합니다. 가능한 값은 0 (PASSIVE), 1 (SLAVE), 2 (MASTER), 3 (RFCULTY), 4 (UNKNOWN) 또는 5 (LISTENING)입니다.

{iface="ens2f0", node="compute-1.example.com", process="ptp4l"} 2

openshift_ptp_max_offset_ns

2 클럭 또는 인터페이스 사이의 나노초의 최대 오프셋을 반환합니다. 예를 들어 업스트림 GNSS 클록과 NIC(ts2phc) 간에 또는 PTP 하드웨어 클록(phc)과 시스템 클럭(phc2sys) 사이에 있습니다.

{from="master", iface="ens2fx", node="compute-1.example.com", process="ts2phc"} 1.038099569e+09

openshift_ptp_offset_ns

DPLL 클록 또는 GNSS 클록 소스와 NIC 하드웨어 클록 사이에 나노초 단위로 오프셋을 반환합니다.

{from="phc", iface="CLOCK_REALTIME", node="compute-1.example.com", process="phc2sys"} -9

openshift_ptp_process_restart_count

ptp4lts2phc 프로세스가 재시작된 횟수를 반환합니다.

{config="ptp4l.0.config", node="compute-1.example.com",process="phc2sys"} 1

openshift_ptp_process_status

PTP 프로세스가 실행 중인지 여부를 나타내는 상태 코드를 반환합니다.

{config="ptp4l.0.config", node="compute-1.example.com",process="phc2sys"} 1

openshift_ptp_threshold

HoldOverTimeout,MaxOffsetThreshold, MinOffsetThreshold 의 값을 반환합니다.

  • holdOverTimeout 은 PTP 마스터 클록의 연결이 끊어지면 PTP 클럭 이벤트 상태가 Free RUN 으로 변경되기 전의 시간(초)입니다.
  • maxOffsetThresholdminOffsetThreshold 는 NIC의 PtpConfig CR에서 구성하는 CLOCK_REALTIME (phc2sys) 또는 마스터 오프셋(ptp4l) 값과 비교하는 나노초의 오프셋 값입니다.

{node="compute-1.example.com", profile="grandmaster", threshold="HoldOverTimeout"} 5

T-GM이 활성화된 경우에만 PTP 빠른 이벤트 메트릭

다음 표에서는 PTP grandmaster 클럭(T-GM)이 활성화된 경우에만 사용할 수 있는 PTP 빠른 이벤트 메트릭을 설명합니다.

표 18.17. T-GM이 활성화된 경우 PTP 빠른 이벤트 메트릭
지표설명예제

openshift_ptp_frequency_status

NIC에 대한 디지털 DPLL( phase-locked loop) 빈도의 현재 상태를 반환합니다. 가능한 값은 -1 (UNKNOWN), 0 (INVALID), 1 (freeRUN), 2 (LOCKED), 3 (LOCKED_HO_ACQ) 또는 4 (HOLDOVER)입니다.

{from="dpll",iface="ens2fx",node="compute-1.example.com",process="dpll"} 3

openshift_ptp_nmea_status

NMEA 연결의 현재 상태를 반환합니다. NMEA는 1PPS NIC 연결에 사용되는 프로토콜입니다. 가능한 값은 0 (UNAVAILABLE) 및 1 (AVAILABLE)입니다.

{iface="ens2fx",node="compute-1.example.com",process="ts2phc"} 1

openshift_ptp_phase_status

NIC의 DPLL 단계 상태를 반환합니다. 가능한 값은 -1 (UNKNOWN), 0 (INVALID), 1 (freeRUN), 2 (LOCKED), 3 (LOCKED_HO_ACQ) 또는 4 (HOLDOVER)입니다.

{from="dpll",iface="ens2fx",node="compute-1.example.com",process="dpll"} 3

openshift_ptp_pps_status

NIC 1PPS 연결의 현재 상태를 반환합니다. 1PPS 연결을 사용하여 연결된 NIC 간에 타이밍을 동기화합니다. 가능한 값은 0 (UNAVAILABLE) 및 1 (AVAILABLE)입니다.

{from="dpll",iface="ens2fx",node="compute-1.example.com",process="dpll"} 1

openshift_ptp_gnss_status

글로벌 탐색 Satellite 시스템(GNSS) 연결의 현재 상태를 반환합니다. GNSS는 전 세계적으로 Satellite 기반 위치 지정, 탐색 및 타이밍 서비스를 제공합니다. 가능한 값은 0 (NOFIX), 1 (DEAD RECKONING 만),2 (D-FIX), 3 (3D-FIX), 4 (GPS+DEAD RECKONING FIX), 5, (시간 만 FIX).

{from="gnss",iface="ens2fx",node="compute-1.example.com",process="gnss"} 3

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.