19.2. PTP 장치 구성


PTP Operator는 NodePtpDevice.ptp.openshift.io CRD(custom resource definition)를 OpenShift Container Platform에 추가합니다.

설치 시 PTP Operator는 각 노드에서 PTP 가능 네트워크 장치를 클러스터에서 검색합니다. 호환되는 PTP 가능 네트워크 장치를 제공하는 각 노드에 대해 NodePtpDevice CR(사용자 정의 리소스) 오브젝트를 생성하고 업데이트합니다.

19.2.1. CLI를 사용하여 PTP Operator 설치

클러스터 관리자는 CLI를 사용하여 Operator를 설치할 수 있습니다.

사전 요구 사항

  • PTP를 지원하는 하드웨어가 있는 노드로 베어 메탈 하드웨어에 설치된 클러스터
  • OpenShift CLI(oc)를 설치합니다.
  • cluster-admin 권한이 있는 사용자로 로그인합니다.

프로세스

  1. PTP Operator의 네임스페이스를 생성합니다.

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

      apiVersion: v1
      kind: Namespace
      metadata:
        name: openshift-ptp
        annotations:
          workload.openshift.io/allowed: management
        labels:
          name: openshift-ptp
          openshift.io/cluster-monitoring: "true"
    2. 네임스페이스 CR을 생성합니다.

      $ oc create -f ptp-namespace.yaml
  2. PTP Operator에 대한 Operator 그룹을 생성합니다.

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

      apiVersion: operators.coreos.com/v1
      kind: OperatorGroup
      metadata:
        name: ptp-operators
        namespace: openshift-ptp
      spec:
        targetNamespaces:
        - openshift-ptp
    2. OperatorGroup CR을 생성합니다.

      $ oc create -f ptp-operatorgroup.yaml
  3. PTP Operator에 등록합니다.

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

      apiVersion: operators.coreos.com/v1alpha1
      kind: Subscription
      metadata:
        name: ptp-operator-subscription
        namespace: openshift-ptp
      spec:
        channel: "stable"
        name: ptp-operator
        source: redhat-operators
        sourceNamespace: openshift-marketplace
    2. 서브스크립션 CR을 생성합니다.

      $ oc create -f ptp-sub.yaml
  4. Operator가 설치되었는지 확인하려면 다음 명령을 입력합니다.

    $ oc get csv -n openshift-ptp -o custom-columns=Name:.metadata.name,Phase:.status.phase

    출력 예

    Name                         Phase
    4.14.0-202301261535          Succeeded

19.2.2. 웹 콘솔을 사용하여 PTP Operator 설치

클러스터 관리자는 웹 콘솔을 사용하여 PTP Operator를 설치할 수 있습니다.

참고

이전 섹션에서 언급한 것처럼 네임스페이스 및 Operator group을 생성해야 합니다.

프로세스

  1. OpenShift Container Platform 웹 콘솔을 사용하여 PTP Operator를 설치합니다.

    1. OpenShift Container Platform 웹 콘솔에서 Operator OperatorHub를 클릭합니다.
    2. 사용 가능한 Operator 목록에서 PTP Operator를 선택한 다음 설치를 클릭합니다.
    3. Operator 설치 페이지의 클러스터의 특정 네임스페이스에서 openshift-ptp를 선택합니다. 그런 다음, 설치를 클릭합니다.
  2. 선택 사항: PTP Operator가 설치되었는지 확인합니다.

    1. Operator 설치된 Operator 페이지로 전환합니다.
    2. PTP Operatoropenshift-ptp 프로젝트에 InstallSucceeded 상태로 나열되어 있는지 확인합니다.

      참고

      설치 중에 Operator는 실패 상태를 표시할 수 있습니다. 나중에 InstallSucceeded 메시지와 함께 설치에 성공하면 이 실패 메시지를 무시할 수 있습니다.

      Operator가 설치된 것으로 나타나지 않으면 다음과 같이 추가 문제 해결을 수행합니다.

      • Operator 설치된 Operator 페이지로 이동하고 Operator 서브스크립션설치 계획 탭의 상태에 장애나 오류가 있는지 검사합니다.
      • Workloads Pod 페이지로 이동하여 openshift-ptp 프로젝트에서 Pod 로그를 확인합니다.

19.2.3. 클러스터에서 PTP 가능 네트워크 장치 검색

  • 클러스터에서 PTP 가능 네트워크 장치의 전체 목록을 반환하려면 다음 명령을 실행합니다.

    $ oc get NodePtpDevice -n openshift-ptp -o yaml

    출력 예

    apiVersion: v1
    items:
    - apiVersion: ptp.openshift.io/v1
      kind: NodePtpDevice
      metadata:
        creationTimestamp: "2022-01-27T15:16:28Z"
        generation: 1
        name: dev-worker-0 1
        namespace: openshift-ptp
        resourceVersion: "6538103"
        uid: d42fc9ad-bcbf-4590-b6d8-b676c642781a
      spec: {}
      status:
        devices: 2
        - name: eno1
        - name: eno2
        - name: eno3
        - name: eno4
        - name: enp5s0f0
        - name: enp5s0f1
    ...

    1
    name 매개변수의 값은 상위 노드의 이름과 동일합니다.
    2
    장치 컬렉션에는 PTP Operator가 노드에 대해 검색하는 PTP 가능 장치 목록이 포함되어 있습니다.

19.2.4. PTP Operator에서 하드웨어별 NIC 기능 사용

기본 제공 PTP 기능이 있는 NIC 하드웨어에는 장치별 구성이 필요한 경우가 있습니다. PtpConfig CR(사용자 정의 리소스)에서 플러그인을 구성하여 PTP Operator에서 지원되는 하드웨어에 하드웨어별 NIC 기능을 사용할 수 있습니다. linuxptp-daemon 서비스는 plugin 스탠자에서 named 매개 변수를 사용하여 특정 하드웨어 구성에 따라 linuxptp 프로세스(ptp4lphc2sys)를 시작합니다.

중요

OpenShift Container Platform 4.14에서는 Intel E810 NIC가 PtpConfig 플러그인에서 지원됩니다.

19.2.5. linuxptp 서비스를 할 마스터 클록으로 구성

호스트 NIC를 구성하는 PtpConfig CR(사용자 정의 리소스)을 생성하여 linuxptp 서비스(ptp4l,phc2sys,ts2phc)를 마스터 클록(T-GM)으로 구성할 수 있습니다.

ts2phc 유틸리티를 사용하면 시스템 시계를 PTP 할 마스터 클록과 동기화하여 노드가 PTP 일반 클럭 및 경계 클록으로 정밀한 클럭을 스트리밍할 수 있습니다.

참고

다음 예제 PtpConfig CR을 기반으로 하여 Intel Westport Channel E810-XXVDA4T 네트워크 인터페이스의 linuxptp 서비스를 T-GM으로 구성합니다.

PTP 빠른 이벤트를 구성하려면 ptp4lOpts,ptp4lConfptpClockThreshold 에 적절한 값을 설정합니다. ptpClockThreshold 는 이벤트가 활성화된 경우에만 사용됩니다. 자세한 내용은 " PTP 빠른 이벤트 알림 게시자 구성"을 참조하십시오.

사전 요구 사항

  • 프로덕션 환경의 T-GM 클록의 경우 베어 메탈 클러스터 호스트에 Intel E810 Westport 채널 NIC를 설치합니다.
  • OpenShift CLI(oc)를 설치합니다.
  • cluster-admin 권한이 있는 사용자로 로그인합니다.
  • PTP Operator를 설치합니다.

프로세스

  1. PtpConfig CR을 생성합니다. 예를 들면 다음과 같습니다.

    1. 요구 사항에 따라 배포에 다음 T-GM 구성 중 하나를 사용하십시오. YAML을 grandmaster-clock-ptp-config.yaml 파일에 저장합니다.

      예 19.1. PTP grandmaster 클럭 구성의 예

      apiVersion: ptp.openshift.io/v1
      kind: PtpConfig
      metadata:
        name: grandmaster
        namespace: openshift-ptp
      spec:
        profile:
        - name: "grandmaster"
          ptp4lOpts: "-2 --summary_interval -4"
          phc2sysOpts: -r -u 0 -m -O -37 -N 8 -R 16 -s $iface_master -n 24
          ptpSchedulingPolicy: SCHED_FIFO
          ptpSchedulingPriority: 10
          ptpSettings:
            logReduce: "true"
          plugins:
            e810:
              enableDefaultConfig: false
              settings:
                LocalMaxHoldoverOffSet: 1500
                LocalHoldoverTimeout: 14400
                MaxInSpecOffset: 100
              pins: $e810_pins
              #  "$iface_master":
              #    "U.FL2": "0 2"
              #    "U.FL1": "0 1"
              #    "SMA2": "0 2"
              #    "SMA1": "0 1"
              ublxCmds:
                - args: #ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
                    - "-P"
                    - "29.20"
                    - "-z"
                    - "CFG-HW-ANT_CFG_VOLTCTRL,1"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -e GPS
                    - "-P"
                    - "29.20"
                    - "-e"
                    - "GPS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d Galileo
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "Galileo"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d GLONASS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "GLONASS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d BeiDou
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "BeiDou"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d SBAS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "SBAS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -t -w 5 -v 1 -e SURVEYIN,600,50000
                    - "-P"
                    - "29.20"
                    - "-t"
                    - "-w"
                    - "5"
                    - "-v"
                    - "1"
                    - "-e"
                    - "SURVEYIN,600,50000"
                  reportOutput: true
                - args: #ubxtool -P 29.20 -p MON-HW
                    - "-P"
                    - "29.20"
                    - "-p"
                    - "MON-HW"
                  reportOutput: true
          ts2phcOpts: " "
          ts2phcConf: |
            [nmea]
            ts2phc.master 1
            [global]
            use_syslog  0
            verbose 1
            logging_level 7
            ts2phc.pulsewidth 100000000
            ts2phc.nmea_serialport $gnss_serialport
            leapfile  /usr/share/zoneinfo/leap-seconds.list
            [$iface_master]
            ts2phc.extts_polarity rising
            ts2phc.extts_correction 0
          ptp4lConf: |
            [$iface_master]
            masterOnly 1
            [$iface_master_1]
            masterOnly 1
            [$iface_master_2]
            masterOnly 1
            [$iface_master_3]
            masterOnly 1
            [global]
            #
            # Default Data Set
            #
            twoStepFlag 1
            priority1 128
            priority2 128
            domainNumber 24
            #utc_offset 37
            clockClass 6
            clockAccuracy 0x27
            offsetScaledLogVariance 0xFFFF
            free_running 0
            freq_est_interval 1
            dscp_event 0
            dscp_general 0
            dataset_comparison G.8275.x
            G.8275.defaultDS.localPriority 128
            #
            # Port Data Set
            #
            logAnnounceInterval -3
            logSyncInterval -4
            logMinDelayReqInterval -4
            logMinPdelayReqInterval 0
            announceReceiptTimeout 3
            syncReceiptTimeout 0
            delayAsymmetry 0
            fault_reset_interval -4
            neighborPropDelayThresh 20000000
            masterOnly 0
            G.8275.portDS.localPriority 128
            #
            # Run time options
            #
            assume_two_step 0
            logging_level 6
            path_trace_enabled 0
            follow_up_info 0
            hybrid_e2e 0
            inhibit_multicast_service 0
            net_sync_monitor 0
            tc_spanning_tree 0
            tx_timestamp_timeout 50
            unicast_listen 0
            unicast_master_table 0
            unicast_req_duration 3600
            use_syslog 1
            verbose 0
            summary_interval -4
            kernel_leap 1
            check_fup_sync 0
            clock_class_threshold 7
            #
            # Servo Options
            #
            pi_proportional_const 0.0
            pi_integral_const 0.0
            pi_proportional_scale 0.0
            pi_proportional_exponent -0.3
            pi_proportional_norm_max 0.7
            pi_integral_scale 0.0
            pi_integral_exponent 0.4
            pi_integral_norm_max 0.3
            step_threshold 2.0
            first_step_threshold 0.00002
            clock_servo pi
            sanity_freq_limit  200000000
            ntpshm_segment 0
            #
            # Transport options
            #
            transportSpecific 0x0
            ptp_dst_mac 01:1B:19:00:00:00
            p2p_dst_mac 01:80:C2:00:00:0E
            udp_ttl 1
            udp6_scope 0x0E
            uds_address /var/run/ptp4l
            #
            # Default interface options
            #
            clock_type BC
            network_transport L2
            delay_mechanism E2E
            time_stamping hardware
            tsproc_mode filter
            delay_filter moving_median
            delay_filter_length 10
            egressLatency 0
            ingressLatency 0
            boundary_clock_jbod 0
            #
            # Clock description
            #
            productDescription ;;
            revisionData ;;
            manufacturerIdentity 00:00:00
            userDescription ;
            timeSource 0x20
        recommend:
        - profile: "grandmaster"
          priority: 4
          match:
          - nodeLabel: "node-role.kubernetes.io/$mcp"
      참고

      예제 PTP 할 마스터 클록 구성은 테스트 목적으로만 사용되며 프로덕션을 위한 것은 아닙니다.

      예 19.2. E810 NIC의 PTP 마스터 클럭 구성

      apiVersion: ptp.openshift.io/v1
      kind: PtpConfig
      metadata:
        name: grandmaster
        namespace: openshift-ptp
      spec:
        profile:
        - name: "grandmaster"
          ptp4lOpts: "-2 --summary_interval -4"
          phc2sysOpts: -r -u 0 -m -O -37 -N 8 -R 16 -s $iface_master -n 24
          ptpSchedulingPolicy: SCHED_FIFO
          ptpSchedulingPriority: 10
          ptpSettings:
            logReduce: "true"
          plugins:
            e810:
              enableDefaultConfig: false
              settings:
                LocalMaxHoldoverOffSet: 1500
                LocalHoldoverTimeout: 14400
                MaxInSpecOffset: 100
              pins: $e810_pins
              #  "$iface_master":
              #    "U.FL2": "0 2"
              #    "U.FL1": "0 1"
              #    "SMA2": "0 2"
              #    "SMA1": "0 1"
              ublxCmds:
                - args: #ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
                    - "-P"
                    - "29.20"
                    - "-z"
                    - "CFG-HW-ANT_CFG_VOLTCTRL,1"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -e GPS
                    - "-P"
                    - "29.20"
                    - "-e"
                    - "GPS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d Galileo
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "Galileo"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d GLONASS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "GLONASS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d BeiDou
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "BeiDou"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d SBAS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "SBAS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -t -w 5 -v 1 -e SURVEYIN,600,50000
                    - "-P"
                    - "29.20"
                    - "-t"
                    - "-w"
                    - "5"
                    - "-v"
                    - "1"
                    - "-e"
                    - "SURVEYIN,600,50000"
                  reportOutput: true
                - args: #ubxtool -P 29.20 -p MON-HW
                    - "-P"
                    - "29.20"
                    - "-p"
                    - "MON-HW"
                  reportOutput: true
          ts2phcOpts: " "
          ts2phcConf: |
            [nmea]
            ts2phc.master 1
            [global]
            use_syslog  0
            verbose 1
            logging_level 7
            ts2phc.pulsewidth 100000000
            ts2phc.nmea_serialport $gnss_serialport
            leapfile  /usr/share/zoneinfo/leap-seconds.list
            [$iface_master]
            ts2phc.extts_polarity rising
            ts2phc.extts_correction 0
          ptp4lConf: |
            [$iface_master]
            masterOnly 1
            [$iface_master_1]
            masterOnly 1
            [$iface_master_2]
            masterOnly 1
            [$iface_master_3]
            masterOnly 1
            [global]
            #
            # Default Data Set
            #
            twoStepFlag 1
            priority1 128
            priority2 128
            domainNumber 24
            #utc_offset 37
            clockClass 6
            clockAccuracy 0x27
            offsetScaledLogVariance 0xFFFF
            free_running 0
            freq_est_interval 1
            dscp_event 0
            dscp_general 0
            dataset_comparison G.8275.x
            G.8275.defaultDS.localPriority 128
            #
            # Port Data Set
            #
            logAnnounceInterval -3
            logSyncInterval -4
            logMinDelayReqInterval -4
            logMinPdelayReqInterval 0
            announceReceiptTimeout 3
            syncReceiptTimeout 0
            delayAsymmetry 0
            fault_reset_interval -4
            neighborPropDelayThresh 20000000
            masterOnly 0
            G.8275.portDS.localPriority 128
            #
            # Run time options
            #
            assume_two_step 0
            logging_level 6
            path_trace_enabled 0
            follow_up_info 0
            hybrid_e2e 0
            inhibit_multicast_service 0
            net_sync_monitor 0
            tc_spanning_tree 0
            tx_timestamp_timeout 50
            unicast_listen 0
            unicast_master_table 0
            unicast_req_duration 3600
            use_syslog 1
            verbose 0
            summary_interval -4
            kernel_leap 1
            check_fup_sync 0
            clock_class_threshold 7
            #
            # Servo Options
            #
            pi_proportional_const 0.0
            pi_integral_const 0.0
            pi_proportional_scale 0.0
            pi_proportional_exponent -0.3
            pi_proportional_norm_max 0.7
            pi_integral_scale 0.0
            pi_integral_exponent 0.4
            pi_integral_norm_max 0.3
            step_threshold 2.0
            first_step_threshold 0.00002
            clock_servo pi
            sanity_freq_limit  200000000
            ntpshm_segment 0
            #
            # Transport options
            #
            transportSpecific 0x0
            ptp_dst_mac 01:1B:19:00:00:00
            p2p_dst_mac 01:80:C2:00:00:0E
            udp_ttl 1
            udp6_scope 0x0E
            uds_address /var/run/ptp4l
            #
            # Default interface options
            #
            clock_type BC
            network_transport L2
            delay_mechanism E2E
            time_stamping hardware
            tsproc_mode filter
            delay_filter moving_median
            delay_filter_length 10
            egressLatency 0
            ingressLatency 0
            boundary_clock_jbod 0
            #
            # Clock description
            #
            productDescription ;;
            revisionData ;;
            manufacturerIdentity 00:00:00
            userDescription ;
            timeSource 0x20
        recommend:
        - profile: "grandmaster"
          priority: 4
          match:
          - nodeLabel: "node-role.kubernetes.io/$mcp"
      참고

      E810 Westport Channel NIC의 경우 ts2phc.nmea_serialport 값을 /dev/gnss0 로 설정합니다.

    2. 다음 명령을 실행하여 CR을 생성합니다.

      $ oc create -f grandmaster-clock-ptp-config.yaml

검증

  1. PtpConfig 프로필이 노드에 적용되었는지 확인합니다.

    1. 다음 명령을 실행하여 openshift-ptp 네임스페이스에서 Pod 목록을 가져옵니다.

      $ oc get pods -n openshift-ptp -o wide

      출력 예

      NAME                          READY   STATUS    RESTARTS   AGE     IP             NODE
      linuxptp-daemon-74m2g         3/3     Running   3          4d15h   10.16.230.7    compute-1.example.com
      ptp-operator-5f4f48d7c-x7zkf  1/1     Running   1          4d15h   10.128.1.145   compute-1.example.com

    2. 프로필이 올바른지 확인합니다. PtpConfig 프로필에 지정한 노드에 해당하는 linuxptp 데몬의 로그를 검사합니다. 다음 명령을 실행합니다.

      $ oc logs linuxptp-daemon-74m2g -n openshift-ptp -c linuxptp-daemon-container

      출력 예

      ts2phc[94980.334]: [ts2phc.0.config] nmea delay: 98690975 ns
      ts2phc[94980.334]: [ts2phc.0.config] ens3f0 extts index 0 at 1676577329.999999999 corr 0 src 1676577330.901342528 diff -1
      ts2phc[94980.334]: [ts2phc.0.config] ens3f0 master offset         -1 s2 freq      -1
      ts2phc[94980.441]: [ts2phc.0.config] nmea sentence: GNRMC,195453.00,A,4233.24427,N,07126.64420,W,0.008,,160223,,,A,V
      phc2sys[94980.450]: [ptp4l.0.config] CLOCK_REALTIME phc offset       943 s2 freq  -89604 delay    504
      phc2sys[94980.512]: [ptp4l.0.config] CLOCK_REALTIME phc offset      1000 s2 freq  -89264 delay    474

19.2.6. linuxptp 서비스를 듀얼 E810 Westport 채널 NIC의 할마스터 클록으로 구성

호스트 NIC를 구성하는 PtpConfig CR(사용자 정의 리소스)을 생성하여 이중 E810 Westport 채널 NIC의 linuxptp 서비스(ptp4l,phc2sys,ts2phc)를 할 마스터 클록(T-GM)으로 구성할 수 있습니다.

분산 RAN(D-RAN) 사용 사례의 경우 다음과 같이 듀얼 NIC에 대한 PTP를 구성할 수 있습니다.

  • NIC 1은 글로벌 탐색 Satellite 시스템(GNSS) 시간 소스와 동기화됩니다.
  • NIC 2는 NIC가 제공하는 1PPS 타이밍 출력과 동기화됩니다. 이 구성은 PtpConfig CR의 PTP 하드웨어 플러그인에서 제공합니다.

듀얼 NIC PTP T-GM 구성에서는 ptp4l 의 단일 인스턴스와 각 NIC에 대해 하나씩 두 개의 ts2phc 인스턴스를 보고하는 하나의 ts2phc 프로세스를 사용합니다. 호스트 시스템 클록은 GNSS 시간 소스에 연결된 NIC에서 동기화됩니다.

참고

다음 예제 PtpConfig CR을 기반으로 하여 이중 Intel Westport Channel E810-XXVDA4T 네트워크 인터페이스의 경우 linuxptp 서비스를 T-GM으로 구성합니다.

PTP 빠른 이벤트를 구성하려면 ptp4lOpts,ptp4lConfptpClockThreshold 에 적절한 값을 설정합니다. ptpClockThreshold 는 이벤트가 활성화된 경우에만 사용됩니다. 자세한 내용은 " PTP 빠른 이벤트 알림 게시자 구성"을 참조하십시오.

사전 요구 사항

  • 프로덕션 환경의 T-GM 클록의 경우 베어 메탈 클러스터 호스트에 두 개의 Intel E810 Westport 채널 NIC를 설치합니다.
  • OpenShift CLI(oc)를 설치합니다.
  • cluster-admin 권한이 있는 사용자로 로그인합니다.
  • PTP Operator를 설치합니다.

프로세스

  1. PtpConfig CR을 생성합니다. 예를 들면 다음과 같습니다.

    1. 다음 YAML을 grandmaster-clock-ptp-config-dual-nics.yaml 파일에 저장합니다.

      예 19.3. 듀얼 E810 NIC에 대한 PTP 마스터 클록 구성

      apiVersion: ptp.openshift.io/v1
      kind: PtpConfig
      metadata:
        name: grandmaster
        namespace: openshift-ptp
        annotations:
          ran.openshift.io/ztp-deploy-wave: "10"
      spec:
        profile:
        - name: "grandmaster"
          ptp4lOpts: "-2 --summary_interval -4"
          phc2sysOpts: -r -u 0 -m -O -37 -N 8 -R 16 -s $iface_nic1 -n 24
          ptpSchedulingPolicy: SCHED_FIFO
          ptpSchedulingPriority: 10
          ptpSettings:
            logReduce: "true"
          plugins:
            e810:
              enableDefaultConfig: false
              settings:
                LocalMaxHoldoverOffSet: 1500
                LocalHoldoverTimeout: 14400
                MaxInSpecOffset: 100
              pins:
               "$iface_nic1":
                 "U.FL2": "0 2"
                 "U.FL1": "0 1"
                 "SMA2": "0 2"
                 "SMA1": "2 1"
               "$iface_nic2":
                 "U.FL2": "0 2"
                 "U.FL1": "0 1"
                 "SMA2": "0 2"
                 "SMA1": "1 1"
              ublxCmds:
                - args: #ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
                    - "-P"
                    - "29.20"
                    - "-z"
                    - "CFG-HW-ANT_CFG_VOLTCTRL,1"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -e GPS
                    - "-P"
                    - "29.20"
                    - "-e"
                    - "GPS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d Galileo
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "Galileo"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d GLONASS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "GLONASS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d BeiDou
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "BeiDou"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -d SBAS
                    - "-P"
                    - "29.20"
                    - "-d"
                    - "SBAS"
                  reportOutput: false
                - args: #ubxtool -P 29.20 -t -w 5 -v 1 -e SURVEYIN,600,50000
                    - "-P"
                    - "29.20"
                    - "-t"
                    - "-w"
                    - "5"
                    - "-v"
                    - "1"
                    - "-e"
                    - "SURVEYIN,600,50000"
                  reportOutput: true
                - args: #ubxtool -P 29.20 -p MON-HW
                    - "-P"
                    - "29.20"
                    - "-p"
                    - "MON-HW"
                  reportOutput: true
          ts2phcOpts: " "
          ts2phcConf: |
            [nmea]
            ts2phc.master 1
            [global]
            use_syslog  0
            verbose 1
            logging_level 7
            ts2phc.pulsewidth 100000000
            #cat /dev/GNSS to find available serial port
            #example value of gnss_serialport is /dev/ttyGNSS_1700_0
            ts2phc.nmea_serialport $gnss_serialport
            leapfile  /usr/share/zoneinfo/leap-seconds.list
            [$iface_nic1]
            ts2phc.extts_polarity rising
            ts2phc.extts_correction 0
            [$iface_nic2]
            ts2phc.master 0
            ts2phc.extts_polarity rising
            #this is a measured value in nanoseconds to compensate for SMA cable delay
            ts2phc.extts_correction -10
          ptp4lConf: |
            [$iface_nic1]
            masterOnly 1
            [$iface_nic1_1]
            masterOnly 1
            [$iface_nic1_2]
            masterOnly 1
            [$iface_nic1_3]
            masterOnly 1
            [$iface_nic2]
            masterOnly 1
            [$iface_nic2_1]
            masterOnly 1
            [$iface_nic2_2]
            masterOnly 1
            [$iface_nic2_3]
            masterOnly 1
            [global]
            #
            # Default Data Set
            #
            twoStepFlag 1
            priority1 128
            priority2 128
            domainNumber 24
            #utc_offset 37
            clockClass 6
            clockAccuracy 0x27
            offsetScaledLogVariance 0xFFFF
            free_running 0
            freq_est_interval 1
            dscp_event 0
            dscp_general 0
            dataset_comparison G.8275.x
            G.8275.defaultDS.localPriority 128
            #
            # Port Data Set
            #
            logAnnounceInterval -3
            logSyncInterval -4
            logMinDelayReqInterval -4
            logMinPdelayReqInterval 0
            announceReceiptTimeout 3
            syncReceiptTimeout 0
            delayAsymmetry 0
            fault_reset_interval -4
            neighborPropDelayThresh 20000000
            masterOnly 0
            G.8275.portDS.localPriority 128
            #
            # Run time options
            #
            assume_two_step 0
            logging_level 6
            path_trace_enabled 0
            follow_up_info 0
            hybrid_e2e 0
            inhibit_multicast_service 0
            net_sync_monitor 0
            tc_spanning_tree 0
            tx_timestamp_timeout 50
            unicast_listen 0
            unicast_master_table 0
            unicast_req_duration 3600
            use_syslog 1
            verbose 0
            summary_interval -4
            kernel_leap 1
            check_fup_sync 0
            clock_class_threshold 7
            #
            # Servo Options
            #
            pi_proportional_const 0.0
            pi_integral_const 0.0
            pi_proportional_scale 0.0
            pi_proportional_exponent -0.3
            pi_proportional_norm_max 0.7
            pi_integral_scale 0.0
            pi_integral_exponent 0.4
            pi_integral_norm_max 0.3
            step_threshold 2.0
            first_step_threshold 0.00002
            clock_servo pi
            sanity_freq_limit  200000000
            ntpshm_segment 0
            #
            # Transport options
            #
            transportSpecific 0x0
            ptp_dst_mac 01:1B:19:00:00:00
            p2p_dst_mac 01:80:C2:00:00:0E
            udp_ttl 1
            udp6_scope 0x0E
            uds_address /var/run/ptp4l
            #
            # Default interface options
            #
            clock_type BC
            network_transport L2
            delay_mechanism E2E
            time_stamping hardware
            tsproc_mode filter
            delay_filter moving_median
            delay_filter_length 10
            egressLatency 0
            ingressLatency 0
            boundary_clock_jbod 1
            #
            # Clock description
            #
            productDescription ;;
            revisionData ;;
            manufacturerIdentity 00:00:00
            userDescription ;
            timeSource 0x20
        recommend:
        - profile: "grandmaster"
          priority: 4
          match:
          - nodeLabel: "node-role.kubernetes.io/$mcp"
      참고

      E810 Westport Channel NIC의 경우 ts2phc.nmea_serialport 값을 /dev/gnss0 로 설정합니다.

    2. 다음 명령을 실행하여 CR을 생성합니다.

      $ oc create -f grandmaster-clock-ptp-config-dual-nics.yaml

검증

  1. PtpConfig 프로필이 노드에 적용되었는지 확인합니다.

    1. 다음 명령을 실행하여 openshift-ptp 네임스페이스에서 Pod 목록을 가져옵니다.

      $ oc get pods -n openshift-ptp -o wide

      출력 예

      NAME                          READY   STATUS    RESTARTS   AGE     IP             NODE
      linuxptp-daemon-74m2g         3/3     Running   3          4d15h   10.16.230.7    compute-1.example.com
      ptp-operator-5f4f48d7c-x7zkf  1/1     Running   1          4d15h   10.128.1.145   compute-1.example.com

    2. 프로필이 올바른지 확인합니다. PtpConfig 프로필에 지정한 노드에 해당하는 linuxptp 데몬의 로그를 검사합니다. 다음 명령을 실행합니다.

      $ oc logs linuxptp-daemon-74m2g -n openshift-ptp -c linuxptp-daemon-container

      출력 예

      ts2phc[509863.660]: [ts2phc.0.config] nmea delay: 347527248 ns
      ts2phc[509863.660]: [ts2phc.0.config] ens2f0 extts index 0 at 1705516553.000000000 corr 0 src 1705516553.652499081 diff 0
      ts2phc[509863.660]: [ts2phc.0.config] ens2f0 master offset          0 s2 freq      -0
      I0117 18:35:16.000146 1633226 stats.go:57] state updated for ts2phc =s2
      I0117 18:35:16.000163 1633226 event.go:417] dpll State s2, gnss State s2, tsphc state s2, gm state s2,
      ts2phc[1705516516]:[ts2phc.0.config] ens2f0 nmea_status 1 offset 0 s2
      GM[1705516516]:[ts2phc.0.config] ens2f0 T-GM-STATUS s2
      ts2phc[509863.677]: [ts2phc.0.config] ens7f0 extts index 0 at 1705516553.000000010 corr -10 src 1705516553.652499081 diff 0
      ts2phc[509863.677]: [ts2phc.0.config] ens7f0 master offset          0 s2 freq      -0
      I0117 18:35:16.016597 1633226 stats.go:57] state updated for ts2phc =s2
      phc2sys[509863.719]: [ptp4l.0.config] CLOCK_REALTIME phc offset        -6 s2 freq  +15441 delay    510
      phc2sys[509863.782]: [ptp4l.0.config] CLOCK_REALTIME phc offset        -7 s2 freq  +15438 delay    502

19.2.6.1. Grandmaster 클럭 PtpConfig 구성 참조

다음 참조 정보는 linuxptp 서비스(ptp4l,phc2sys,ts2phc)를 마스터 클록으로 구성하는 PtpConfig CR(사용자 정의 리소스)의 구성 옵션을 설명합니다.

표 19.1. PTP Grandmaster 클록에 대한 PtpConfig 구성 옵션
PtpConfig CR field설명

plugins

마스터 클록 작업에 대한 NIC를 구성하는 .exec.cmdline 옵션 배열을 지정합니다. Grandmaster 클럭 구성을 사용하려면 특정 PTP 핀을 비활성화해야 합니다.

플러그인 메커니즘을 사용하면 PTP Operator가 자동화된 하드웨어 구성을 수행할 수 있습니다. Intel Westport 채널 NIC의 경우 enableDefaultConfig 가 true인 경우 PTP Operator는 NIC에 필요한 구성을 수행하기 위해 하드 코딩된 스크립트를 실행합니다.

ptp4lOpts

ptp4l 서비스에 대한 시스템 구성 옵션을 지정합니다. 옵션은 네트워크 인터페이스 이름과 서비스 구성 파일이 자동으로 추가되므로 네트워크 인터페이스 이름 -i <interface> 및 서비스 구성 파일 -f /etc/ptp4l.conf를 포함하지 않아야 합니다.

ptp4lConf

ptp4l 을 할 마스터 클록으로 시작하는 데 필요한 구성을 지정합니다. 예를 들어 ens2f1 인터페이스는 다운스트림 연결 장치를 동기화합니다. 마스터 클록의 경우 clockClass6 으로 설정하고 clockAccuracy0x27 로 설정합니다. GNSS(Global navigation satellite system)에서 타이밍 신호를 수신할 때 timeSource0x20 으로 설정합니다.

tx_timestamp_timeout

데이터를 삭제하기 전에 발신자로부터 전송(TX) 타임스탬프를 대기할 최대 시간(TX)을 지정합니다.

boundary_clock_jbod

JBOD 경계 클럭 시간 지연 값을 지정합니다. 이 값은 네트워크 시간 장치 간에 전달되는 시간 값을 수정하는 데 사용됩니다.

phc2sysOpts

phc2sys 서비스에 대한 시스템 구성 옵션을 지정합니다. 이 필드가 비어 있으면 PTP Operator에서 phc2sys 서비스를 시작하지 않습니다.

참고

여기에 나열된 네트워크 인터페이스가 grandmaster로 구성되어 있고 ts2phcConfptp4lConf 필드에서 필요에 따라 참조되는지 확인합니다.

ptpSchedulingPolicy

ptp4lphc2sys 프로세스에 대한 스케줄링 정책을 구성합니다. 기본값은 Cryo stat_OTHER 입니다. FIFO 스케줄링을 지원하는 시스템에서 Cryostat _FIFO 를 사용합니다.

ptpSchedulingPriority

ptpSchedulingPolicy 가 Cryostat _FIFO 로 설정된 경우 ptp4lphc2sys 프로세스의 FIFO 우선 순위를 구성하도록 1-65의 정수 값을 설정합니다. ptpSchedulingPolicy 가 ptpSchedulingPolicy로 설정된 경우 ptpSchedulingPriority 필드는 사용되지 않습니다.

ptpClockThreshold

선택 사항: ptpClockThreshold 스탠자가 없으면 ptpClockThreshold 필드에 기본값이 사용됩니다. 스탠자는 기본 ptpClockThreshold 값을 표시합니다. ptpClockThreshold 값은 PTP 이벤트가 트리거되기 전에 PTP 마스터 클록의 연결이 해제된 후의 시간을 구성합니다. holdOverTimeout 은 PTP 마스터 클록의 연결이 끊어지면 PTP 클럭 이벤트 상태가 Free RUN 으로 변경되기 전의 시간(초)입니다. maxOffsetThresholdminOffsetThreshold 설정은 CLOCK_REALTIME (phc2sys) 또는 master 오프셋(ptp4l)의 값과 비교하는 오프셋 값을 나노초로 구성합니다. ptp4l 또는 phc2sys 오프셋 값이 이 범위를 벗어나는 경우 PTP 클럭 상태가 Free RUN으로 설정됩니다. 오프셋 값이 이 범위 내에 있으면 PTP 클럭 상태가 LOCKED 로 설정됩니다.

ts2phcConf

ts2phc 명령의 구성을 설정합니다.

leapfile 은 PTP Operator 컨테이너 이미지의 현재 윤초 정의 파일의 기본 경로입니다.

ts2phc.nmea_serialport 는 NMEA GPS 클럭 소스에 연결된 직렬 포트 장치입니다. 구성되면 / dev/gnss<id> 에서 GNSS 수신자에 액세스할 수 있습니다. 호스트에 GNSS 수신자가 여러 개 있는 경우 다음 장치 중 하나를 열거하여 올바른 장치를 찾을 수 있습니다.

  • /sys/class/net/<eth_port>/device/gnss/
  • /sys/class/gnss/gnss<id>/device/

ts2phcOpts

ts2phc 명령에 대한 옵션을 설정합니다.

권장

프로필 을 노드에 적용하는 방법에 대한 규칙을 정의하는 하나 이상의 recommend 오브젝트 배열을 지정합니다.

.recommend.profile

profile 섹션에 정의된 .recommend.profile 오브젝트 이름을 지정합니다.

.recommend.priority

0에서 99 사이의 정수 값으로 priority를 지정합니다. 숫자가 클수록 우선순위가 낮으므로 우선순위 99는 우선순위 10보다 낮습니다. match 필드에 정의된 규칙에 따라 여러 프로필과 노드를 일치시킬 수 있는 경우 우선 순위가 높은 프로필이 해당 노드에 적용됩니다.

.recommend.match

nodeLabel 또는 nodeName 값을 사용하여 .recommend.match 규칙을 지정합니다.

.recommend.match.nodeLabel

oc get nodes --show-labels 명령을 사용하여 노드 오브젝트에서 node.Labels 필드의 키로 nodeLabel 을 설정합니다. 예: node-role.kubernetes.io/worker.

.recommend.match.nodeName

oc get nodes 명령을 사용하여 노드 오브젝트의 node.Name 필드 값으로 nodeName 을 설정합니다. 예를 들면 compute-1.example.com 입니다.

19.2.6.2. Grandmaster 클럭 클래스 동기화 상태 참조

다음 표는 PTP 할 마스터 클록 (T-GM) gm.ClockClass 상태를 설명합니다. 클럭 클래스는 PRTC(Basic Reference Time Clock) 또는 기타 타이밍 소스와 관련하여 정확성 및 안정성을 기반으로 T-GM 시계를 분류합니다.

홀드오버 사양은 PTP 클럭이 기본 시간 소스에서 업데이트를 수신하지 않고도 동기화를 유지할 수 있는 시간입니다.

표 19.2. T-GM 클럭 클래스 상태
클럭 클래스 상태설명

gm.ClockClass 6

T-GM 클록은 LOCKED 모드의 PRTC에 연결됩니다. 예를 들어 PRTC는 GNSS 시간 소스에서 추적할 수 있습니다.

gm.ClockClass 7

T-GM 클록은 HOLDOVER 모드 및 홀드오버 사양에 있습니다. 클럭 소스는 카테고리 1 빈도 소스에서 추적되지 않을 수 있습니다.

gm.ClockClass 140

T-GM 시계는 HOLDOVER 모드에 있으며, 홀드오버 사양이 없지만 카테고리 1 빈도 소스에서 여전히 추적할 수 있습니다.

gm.ClockClass 248

T-GM 시계는 freeRUN 모드입니다.

자세한 내용은 "상시/시간 추적 정보", ITU-T G.8275.1/Y.1369.1 권장 사항을 참조하십시오.

19.2.6.3. Intel Westport Channel E810 하드웨어 구성 참조

이 정보를 사용하여 Intel E810-XXVDA4T 하드웨어 플러그인 을 사용하여 E810 네트워크 인터페이스를 PTP 할 마스터 클록으로 구성하는 방법을 파악합니다. 하드웨어 핀 구성은 네트워크 인터페이스가 시스템의 다른 구성 요소 및 장치와 상호 작용하는 방식을 결정합니다. E810-XXVDA4T NIC에는 외부 1PPS 신호를 위한 4개의 커넥터(SMA1, SMA 2,U.FL1, U.FL2 )가 있습니다.

표 19.3. Intel E810 NIC 하드웨어 커넥터 구성
하드웨어 핀권장 설정설명

U.FL1

0 1

U.FL1 커넥터 입력을 비활성화합니다. U.FL1 커넥터는 출력 전용입니다.

U.FL2

0 2

U.FL2 커넥터 출력을 비활성화합니다. U.FL2 커넥터는 입력 전용입니다.

SMA1

0 1

SMA1 커넥터 입력을 비활성화합니다. SMA1 커넥터는 양방향입니다.

SMA2

0 2

SMA2 커넥터 출력을 비활성화합니다. SMA2 커넥터는 양방향입니다.

참고

SMA1U.FL1 커넥터는 채널 1을 공유합니다. SMA2U.FL2 커넥터는 채널 2를 공유합니다.

spec.profile.plugins.e810.ublxCmds 매개변수를 설정하여 PtpConfig CR(사용자 정의 리소스)에서 GNSS 시계를 구성합니다. 이러한 ublxCmds 스탠자 각각 ubxtool 명령을 사용하여 호스트 NIC에 적용되는 구성에 해당합니다. 예를 들면 다음과 같습니다.

ublxCmds:
  - args: #ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1
      - "-P"
      - "29.20"
      - "-z"
      - "CFG-HW-ANT_CFG_VOLTCTRL,1"
    reportOutput: false

다음 표에서는 동일한 ubxtool 명령을 설명합니다.

표 19.4. Intel E810 ublxCmds 구성
ubxtool 명령설명

ubxtool -P 29.20 -z CFG-HW-ANT_CFG_VOLTCTRL,1

Anchontion control을 사용할 수 있습니다. UBX-MON-RFUBX-INF-NOTICE 로그 메시지에서 radio status를 보고할 수 있습니다.

ubxtool -P 29.20 -e GPS

Angon이 GPS 신호를 수신할 수 있도록 합니다.

ubxtool -P 29.20 -d Galileo

Galileo GPS satellite에서 신호를 수신하도록 Angalileo GPS Satellite를 구성합니다.

ubxtool -P 29.20 -d GLONASS

GLONASS GPS Satellite에서 신호를 수신하지 못하게 합니다.

ubxtool -P 29.20 -d BeiDou

마진이 BeiDou GPS Satellite에서 신호를 수신하지 못하도록 비활성화합니다.

ubxtool -P 29.20 -d SBAS

SBAS GPS Satellite에서 신호를 수신하지 못하게 합니다.

ubxtool -P 29.20 -t -w 5 -v 1 -e SURVEYIN,600,50000

초기 위치 추정을 개선하도록 GNSS 수신기 설문 조사 프로세스를 구성합니다. 최적의 결과를 얻으려면 최대 24 시간이 걸릴 수 있습니다.

ubxtool -P 29.20 -p MON-HW

하드웨어의 자동화된 단일 검사를 실행하고 NIC 상태 및 구성 설정에 대해 보고합니다.

E810 플러그인은 다음 인터페이스를 구현합니다.

표 19.5. E810 플러그인 인터페이스
인터페이스설명

OnPTPConfigChangeE810

PtpConfig CR을 업데이트할 때마다 실행됩니다. 이 함수는 플러그인 옵션을 구문 분석하고 구성 데이터를 기반으로 네트워크 장치 핀에 필요한 구성을 적용합니다.

AfterRunPTPCommandE810

PTP 프로세스를 시작하고 gpspipe PTP 명령을 실행한 후 실행됩니다. 이 함수는 플러그인 옵션을 처리하고 ubxtool 명령을 실행하여 플러그인별 데이터에 출력을 저장합니다.

PopulateHwConfigE810

PtpConfig CR의 하드웨어 관련 데이터를 기반으로 NodePtpDevice CR을 채웁니다.

E810 플러그인에는 다음과 같은 구조 및 변수가 있습니다.

표 19.6. E810 플러그인 구조 및 변수
struct설명

E810Opts

부울 플래그 및 네트워크 장치 핀 맵을 포함하여 E810 플러그인의 옵션을 나타냅니다.

E810UblxCmds

부울 플래그와 명령 인수에 대한 문자열 슬라이스를 사용하여 ubxtool 명령에 대한 구성을 나타냅니다.

E810PluginData

플러그인 실행 중에 사용되는 플러그인별 데이터를 보유합니다.

19.2.6.4. Dual E810 Westport 채널 NIC 구성 참조

이 정보를 사용하여 Intel E810-XXVDA4T 하드웨어 플러그인 을 사용하여 E810 네트워크 인터페이스를 PTP 할 마스터 클록(T-GM)으로 구성하는 방법을 파악합니다.

듀얼 NIC 클러스터 호스트를 구성하기 전에 1PPS faceplace 연결을 사용하여 두 NIC를 SMA1 케이블로 연결해야 합니다.

듀얼 NIC T-GM을 구성할 때 SMA1 연결 포트를 사용하여 NIC를 연결할 때 발생하는 1PPS 신호 지연을 보완해야 합니다. 케이블 길이, 주변 온도 및 구성 요소 및 제조 허용 오차와 같은 다양한 요인은 신호 지연에 영향을 미칠 수 있습니다. 지연을 보완하려면 신호 지연을 오프셋하는 데 사용하는 특정 값을 계산해야 합니다.

표 19.7. E810 듀얼 NIC T-GM PtpConfig CR 참조
PtpConfig 필드설명

spec.profile.plugins.e810.pins

PTP Operator E810 하드웨어 플러그인을 사용하여 E810 하드웨어 핀을 구성합니다.

  • Pin 2 1 은 NIC에서 SMA1 에 대한 1PPS OUT 연결을 활성화합니다.
  • Pin 1 은 NIC에서 SMA1 에 대한 1PPS IN 연결을 활성화합니다.

spec.profile.ts2phcConf

ts2phcConf 필드를 사용하여 NIC 1과 NIC 2에 대한 매개변수를 구성합니다. NIC 2의 경우 ts2phc.master 0 을 설정합니다. 이렇게 하면 GNSS가 아닌 1PPS 입력에서 NIC 2의 타이밍 소스를 구성합니다. NIC 2에 대해 ts2phc.extts_correction 값을 구성하여 사용하는 특정 SMA 케이블 및 케이블 길이에 대해 발생하는 지연을 보완합니다. 구성하는 값은 특정 측정 및 SMA1 케이블 길이에 따라 다릅니다.

spec.profile.ptp4lConf

boundary_clock_jbod 값을 1로 설정하여 여러 NIC에 대한 지원을 활성화합니다.

19.2.7. linuxptp 서비스를 경계 클록으로 구성

PtpConfig CR(사용자 정의 리소스) 오브젝트를 생성하여 linuxptp 서비스(ptp4l,phc2sys)를 경계 클록으로 구성할 수 있습니다.

참고

다음 예제 PtpConfig CR을 기준으로 사용하여 linuxptp 서비스를 특정 하드웨어 및 환경의 경계 클록으로 구성합니다. 이 예제 CR에서는 PTP 빠른 이벤트를 구성하지 않습니다. PTP 빠른 이벤트를 구성하려면 ptp4lOpts,ptp4lConfptpClockThreshold 에 적절한 값을 설정합니다. ptpClockThreshold 는 이벤트가 활성화된 경우에만 사용됩니다. 자세한 내용은 " PTP 빠른 이벤트 알림 게시자 구성"을 참조하십시오.

사전 요구 사항

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

프로세스

  1. 다음 PtpConfig CR을 만든 다음 YAML을 boundary-clock-ptp-config.yaml 파일에 저장합니다.

    PTP 경계 클럭 구성의 예

    apiVersion: ptp.openshift.io/v1
    kind: PtpConfig
    metadata:
      name: boundary-clock
      namespace: openshift-ptp
      annotations: {}
    spec:
      profile:
        - name: boundary-clock
          ptp4lOpts: "-2"
          phc2sysOpts: "-a -r -n 24"
          ptpSchedulingPolicy: SCHED_FIFO
          ptpSchedulingPriority: 10
          ptpSettings:
            logReduce: "true"
          ptp4lConf: |
            # The interface name is hardware-specific
            [$iface_slave]
            masterOnly 0
            [$iface_master_1]
            masterOnly 1
            [$iface_master_2]
            masterOnly 1
            [$iface_master_3]
            masterOnly 1
            [global]
            #
            # Default Data Set
            #
            twoStepFlag 1
            slaveOnly 0
            priority1 128
            priority2 128
            domainNumber 24
            #utc_offset 37
            clockClass 248
            clockAccuracy 0xFE
            offsetScaledLogVariance 0xFFFF
            free_running 0
            freq_est_interval 1
            dscp_event 0
            dscp_general 0
            dataset_comparison G.8275.x
            G.8275.defaultDS.localPriority 128
            #
            # Port Data Set
            #
            logAnnounceInterval -3
            logSyncInterval -4
            logMinDelayReqInterval -4
            logMinPdelayReqInterval -4
            announceReceiptTimeout 3
            syncReceiptTimeout 0
            delayAsymmetry 0
            fault_reset_interval -4
            neighborPropDelayThresh 20000000
            masterOnly 0
            G.8275.portDS.localPriority 128
            #
            # Run time options
            #
            assume_two_step 0
            logging_level 6
            path_trace_enabled 0
            follow_up_info 0
            hybrid_e2e 0
            inhibit_multicast_service 0
            net_sync_monitor 0
            tc_spanning_tree 0
            tx_timestamp_timeout 50
            unicast_listen 0
            unicast_master_table 0
            unicast_req_duration 3600
            use_syslog 1
            verbose 0
            summary_interval 0
            kernel_leap 1
            check_fup_sync 0
            clock_class_threshold 135
            #
            # Servo Options
            #
            pi_proportional_const 0.0
            pi_integral_const 0.0
            pi_proportional_scale 0.0
            pi_proportional_exponent -0.3
            pi_proportional_norm_max 0.7
            pi_integral_scale 0.0
            pi_integral_exponent 0.4
            pi_integral_norm_max 0.3
            step_threshold 2.0
            first_step_threshold 0.00002
            max_frequency 900000000
            clock_servo pi
            sanity_freq_limit 200000000
            ntpshm_segment 0
            #
            # Transport options
            #
            transportSpecific 0x0
            ptp_dst_mac 01:1B:19:00:00:00
            p2p_dst_mac 01:80:C2:00:00:0E
            udp_ttl 1
            udp6_scope 0x0E
            uds_address /var/run/ptp4l
            #
            # Default interface options
            #
            clock_type BC
            network_transport L2
            delay_mechanism E2E
            time_stamping hardware
            tsproc_mode filter
            delay_filter moving_median
            delay_filter_length 10
            egressLatency 0
            ingressLatency 0
            boundary_clock_jbod 0
            #
            # Clock description
            #
            productDescription ;;
            revisionData ;;
            manufacturerIdentity 00:00:00
            userDescription ;
            timeSource 0xA0
      recommend:
        - profile: boundary-clock
          priority: 4
          match:
            - nodeLabel: "node-role.kubernetes.io/$mcp"

    표 19.8. PTP 경계 클럭 CR 구성 옵션
    CR 필드설명

    name

    PtpConfig CR의 이름입니다.

    profile

    하나 이상의 profile 오브젝트의 배열을 지정합니다.

    name

    프로파일 오브젝트를 고유하게 식별하는 프로파일 오브젝트의 이름을 지정합니다.

    ptp4lOpts

    ptp4l 서비스에 대한 시스템 구성 옵션을 지정합니다. 옵션은 네트워크 인터페이스 이름과 서비스 구성 파일이 자동으로 추가되므로 네트워크 인터페이스 이름 -i <interface> 및 서비스 구성 파일 -f /etc/ptp4l.conf를 포함하지 않아야 합니다.

    ptp4lConf

    ptp4l 을 경계 클록으로 시작하는 데 필요한 구성을 지정합니다. 예를 들어 ens1f0 은 그랜드 마스터 클록에서 동기화되고 ens1f3은 연결된 장치를 동기화합니다.

    <interface_1>

    동기화 시계를 수신하는 인터페이스입니다.

    <interface_2>

    동기화 시계를 전송하는 인터페이스입니다.

    tx_timestamp_timeout

    Intel Columbiaville 800 시리즈 NIC의 경우 tx_timestamp_timeout50 으로 설정합니다.

    boundary_clock_jbod

    Intel Columbiaville 800 시리즈 NIC의 경우 boundary_clock_jbod0 으로 설정되어 있는지 확인합니다. Intel Fortville X710 시리즈 NIC의 경우 boundary_clock_jbod1 로 설정되어 있는지 확인합니다.

    phc2sysOpts

    phc2sys 서비스에 대한 시스템 구성 옵션을 지정합니다. 이 필드가 비어 있으면 PTP Operator에서 phc2sys 서비스를 시작하지 않습니다.

    ptpSchedulingPolicy

    ptp4l 및 phc2sys 프로세스에 대한 스케줄링 정책. 기본값은 Cryo stat_OTHER 입니다. FIFO 스케줄링을 지원하는 시스템에서 Cryostat _FIFO 를 사용합니다.

    ptpSchedulingPriority

    ptpSchedulingPolicy 가 Cryostat _FIFO 로 설정된 경우 ptp4lphc2sys 프로세스의 FIFO 우선 순위를 설정하는 데 사용되는 1-65의 정수 값입니다. ptpSchedulingPolicy 가 ptpSchedulingPolicy로 설정된 경우 ptpSchedulingPriority 필드는 사용되지 않습니다.

    ptpClockThreshold

    선택 사항: ptpClockThreshold 가 없으면 ptpClockThreshold 필드에 기본값이 사용됩니다. ptpClockThreshold 는 PTP 이벤트가 트리거되기 전에 PTP 마스터 클록의 연결이 해제된 후의 시간을 구성합니다. holdOverTimeout 은 PTP 마스터 클록의 연결이 끊어지면 PTP 클럭 이벤트 상태가 Free RUN 으로 변경되기 전의 시간(초)입니다. maxOffsetThresholdminOffsetThreshold 설정은 CLOCK_REALTIME (phc2sys) 또는 master 오프셋(ptp4l)의 값과 비교하는 오프셋 값을 나노초로 구성합니다. ptp4l 또는 phc2sys 오프셋 값이 이 범위를 벗어나는 경우 PTP 클럭 상태가 Free RUN으로 설정됩니다. 오프셋 값이 이 범위 내에 있으면 PTP 클럭 상태가 LOCKED 로 설정됩니다.

    권장

    프로필 을 노드에 적용하는 방법에 대한 규칙을 정의하는 하나 이상의 recommend 오브젝트 배열을 지정합니다.

    .recommend.profile

    profile 섹션에 정의된 .recommend. profile 오브젝트 이름을 지정합니다.

    .recommend.priority

    0에서 99 사이의 정수 값으로 priority를 지정합니다. 숫자가 클수록 우선순위가 낮으므로 우선순위 99는 우선순위 10보다 낮습니다. match 필드에 정의된 규칙에 따라 여러 프로필과 노드를 일치시킬 수 있는 경우 우선 순위가 높은 프로필이 해당 노드에 적용됩니다.

    .recommend.match

    nodeLabel 또는 nodeName 값을 사용하여 .recommend.match 규칙을 지정합니다.

    .recommend.match.nodeLabel

    oc get nodes --show-labels 명령을 사용하여 노드 오브젝트에서 node.Labels 필드의 키로 nodeLabel 을 설정합니다. 예: node-role.kubernetes.io/worker.

    .recommend.match.nodeName

    oc get nodes 명령을 사용하여 노드 오브젝트의 node.Name 필드 값으로 nodeName 을 설정합니다. 예를 들면 compute-1.example.com 입니다.

  2. 다음 명령을 실행하여 CR을 생성합니다.

    $ oc create -f boundary-clock-ptp-config.yaml

검증

  1. PtpConfig 프로필이 노드에 적용되었는지 확인합니다.

    1. 다음 명령을 실행하여 openshift-ptp 네임스페이스에서 Pod 목록을 가져옵니다.

      $ oc get pods -n openshift-ptp -o wide

      출력 예

      NAME                            READY   STATUS    RESTARTS   AGE   IP               NODE
      linuxptp-daemon-4xkbb           1/1     Running   0          43m   10.1.196.24      compute-0.example.com
      linuxptp-daemon-tdspf           1/1     Running   0          43m   10.1.196.25      compute-1.example.com
      ptp-operator-657bbb64c8-2f8sj   1/1     Running   0          43m   10.129.0.61      control-plane-1.example.com

    2. 프로필이 올바른지 확인합니다. PtpConfig 프로필에 지정한 노드에 해당하는 linuxptp 데몬의 로그를 검사합니다. 다음 명령을 실행합니다.

      $ oc logs linuxptp-daemon-4xkbb -n openshift-ptp -c linuxptp-daemon-container

      출력 예

      I1115 09:41:17.117596 4143292 daemon.go:107] in applyNodePTPProfile
      I1115 09:41:17.117604 4143292 daemon.go:109] updating NodePTPProfile to:
      I1115 09:41:17.117607 4143292 daemon.go:110] ------------------------------------
      I1115 09:41:17.117612 4143292 daemon.go:102] Profile Name: profile1
      I1115 09:41:17.117616 4143292 daemon.go:102] Interface:
      I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2
      I1115 09:41:17.117623 4143292 daemon.go:102] Phc2sysOpts: -a -r -n 24
      I1115 09:41:17.117626 4143292 daemon.go:116] ------------------------------------

19.2.7.1. linuxptp 서비스를 듀얼 NIC 하드웨어의 경계 클럭으로 구성

중요

이중 NIC가 경계 클럭으로 구성된 PTP(Precision Time Protocol) 하드웨어는 기술 프리뷰 기능 전용입니다. 기술 프리뷰 기능은 Red Hat 프로덕션 서비스 수준 계약(SLA)에서 지원되지 않으며 기능적으로 완전하지 않을 수 있습니다. 따라서 프로덕션 환경에서 사용하는 것은 권장하지 않습니다. 이러한 기능을 사용하면 향후 제품 기능을 조기에 이용할 수 있어 개발 과정에서 고객이 기능을 테스트하고 피드백을 제공할 수 있습니다.

Red Hat 기술 프리뷰 기능의 지원 범위에 대한 자세한 내용은 기술 프리뷰 기능 지원 범위를 참조하십시오.

각 NIC에 대해 PtpConfig CR(사용자 정의 리소스) 오브젝트를 생성하여 linuxptp 서비스(ptp4l,phc2sys)를 듀얼 NIC 하드웨어의 경계 클록으로 구성할 수 있습니다.

듀얼 NIC 하드웨어를 사용하면 각 NIC가 다운스트림 클록에 대해 별도의 ptp4l 인스턴스를 사용하여 각 NIC를 동일한 업스트림 리더 클록에 연결할 수 있습니다.

사전 요구 사항

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

프로세스

  1. 각 CR의 기준으로 "linuxptp 서비스를 경계 클록으로 구성"의 참조 CR을 사용하여 각 NIC에 대해 하나씩 두 개의 개별 PtpConfig CR을 생성합니다. 예를 들면 다음과 같습니다.

    1. phc2sysOpts: 값을 지정하여 boundary-clock-ptp-config-nic1.yaml 을 생성합니다.

      apiVersion: ptp.openshift.io/v1
      kind: PtpConfig
      metadata:
        name: boundary-clock-ptp-config-nic1
        namespace: openshift-ptp
      spec:
        profile:
        - name: "profile1"
          ptp4lOpts: "-2 --summary_interval -4"
          ptp4lConf: | 1
            [ens5f1]
            masterOnly 1
            [ens5f0]
            masterOnly 0
          ...
          phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" 2
      1
      ptp4l 을 경계 클록으로 시작하는 데 필요한 인터페이스를 지정합니다. 예를 들어 ens5f0 은 마스터 클록에서 동기화되고 ens5f1 은 연결된 장치를 동기화합니다.
      2
      필수 phc2sysOpts 값. -m 은 메시지를 stdout 에 출력합니다. linuxptp-daemon DaemonSet 은 로그를 구문 분석하고 Prometheus 지표를 생성합니다.
    2. boundary-clock-ptp-config-nic2.yaml 을 생성하여 phc2sysOpts 필드를 완전히 제거하여 두 번째 NIC에 대한 phc2sys 서비스를 비활성화합니다.

      apiVersion: ptp.openshift.io/v1
      kind: PtpConfig
      metadata:
        name: boundary-clock-ptp-config-nic2
        namespace: openshift-ptp
      spec:
        profile:
        - name: "profile2"
          ptp4lOpts: "-2 --summary_interval -4"
          ptp4lConf: | 1
            [ens7f1]
            masterOnly 1
            [ens7f0]
            masterOnly 0
      ...
      1
      ptp4l 을 두 번째 NIC에서 경계 클록으로 시작하는 데 필요한 인터페이스를 지정합니다.
      참고

      두 번째 NIC에서 phc2sys 서비스를 비활성화하려면 두 번째 PtpConfig CR에서 phc2sys 필드를 완전히 제거해야 합니다.

  2. 다음 명령을 실행하여 듀얼 NIC PtpConfig CR을 생성합니다.

    1. 첫 번째 NIC에 대해 PTP를 구성하는 CR을 생성합니다.

      $ oc create -f boundary-clock-ptp-config-nic1.yaml
    2. 두 번째 NIC에 대해 PTP를 구성하는 CR을 생성합니다.

      $ oc create -f boundary-clock-ptp-config-nic2.yaml

검증

  • PTP Operator가 두 NIC 모두에 PtpConfig CR을 적용했는지 확인합니다. 듀얼 NIC 하드웨어가 설치된 노드에 해당하는 linuxptp 데몬의 로그를 검사합니다. 예를 들어 다음 명령을 실행합니다.

    $ oc logs linuxptp-daemon-cvgr6 -n openshift-ptp -c linuxptp-daemon-container

    출력 예

    ptp4l[80828.335]: [ptp4l.1.config] master offset          5 s2 freq   -5727 path delay       519
    ptp4l[80828.343]: [ptp4l.0.config] master offset         -5 s2 freq  -10607 path delay       533
    phc2sys[80828.390]: [ptp4l.0.config] CLOCK_REALTIME phc offset         1 s2 freq  -87239 delay    539

19.2.8. linuxptp 서비스를 일반 클록으로 구성

PtpConfig CR(사용자 정의 리소스) 오브젝트를 생성하여 linuxptp 서비스(ptp4l,phc2sys)를 일반 클록으로 구성할 수 있습니다.

참고

다음 예제 PtpConfig CR을 기반으로 linuxptp 서비스를 특정 하드웨어 및 환경의 일반 클록으로 구성합니다. 이 예제 CR에서는 PTP 빠른 이벤트를 구성하지 않습니다. PTP 빠른 이벤트를 구성하려면 ptp4lOpts,ptp4lConfptpClockThreshold 에 적절한 값을 설정합니다. ptpClockThreshold 는 이벤트가 활성화된 경우에만 필요합니다. 자세한 내용은 " PTP 빠른 이벤트 알림 게시자 구성"을 참조하십시오.

사전 요구 사항

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

프로세스

  1. 다음 PtpConfig CR을 생성한 다음 YAML을 ordinary-clock-ptp-config.yaml 파일에 저장합니다.

    PTP 일반 클럭 구성의 예

    apiVersion: ptp.openshift.io/v1
    kind: PtpConfig
    metadata:
      name: ordinary-clock
      namespace: openshift-ptp
      annotations: {}
    spec:
      profile:
        - name: ordinary-clock
          # The interface name is hardware-specific
          interface: $interface
          ptp4lOpts: "-2 -s"
          phc2sysOpts: "-a -r -n 24"
          ptpSchedulingPolicy: SCHED_FIFO
          ptpSchedulingPriority: 10
          ptpSettings:
            logReduce: "true"
          ptp4lConf: |
            [global]
            #
            # Default Data Set
            #
            twoStepFlag 1
            slaveOnly 1
            priority1 128
            priority2 128
            domainNumber 24
            #utc_offset 37
            clockClass 255
            clockAccuracy 0xFE
            offsetScaledLogVariance 0xFFFF
            free_running 0
            freq_est_interval 1
            dscp_event 0
            dscp_general 0
            dataset_comparison G.8275.x
            G.8275.defaultDS.localPriority 128
            #
            # Port Data Set
            #
            logAnnounceInterval -3
            logSyncInterval -4
            logMinDelayReqInterval -4
            logMinPdelayReqInterval -4
            announceReceiptTimeout 3
            syncReceiptTimeout 0
            delayAsymmetry 0
            fault_reset_interval -4
            neighborPropDelayThresh 20000000
            masterOnly 0
            G.8275.portDS.localPriority 128
            #
            # Run time options
            #
            assume_two_step 0
            logging_level 6
            path_trace_enabled 0
            follow_up_info 0
            hybrid_e2e 0
            inhibit_multicast_service 0
            net_sync_monitor 0
            tc_spanning_tree 0
            tx_timestamp_timeout 50
            unicast_listen 0
            unicast_master_table 0
            unicast_req_duration 3600
            use_syslog 1
            verbose 0
            summary_interval 0
            kernel_leap 1
            check_fup_sync 0
            clock_class_threshold 7
            #
            # Servo Options
            #
            pi_proportional_const 0.0
            pi_integral_const 0.0
            pi_proportional_scale 0.0
            pi_proportional_exponent -0.3
            pi_proportional_norm_max 0.7
            pi_integral_scale 0.0
            pi_integral_exponent 0.4
            pi_integral_norm_max 0.3
            step_threshold 2.0
            first_step_threshold 0.00002
            max_frequency 900000000
            clock_servo pi
            sanity_freq_limit 200000000
            ntpshm_segment 0
            #
            # Transport options
            #
            transportSpecific 0x0
            ptp_dst_mac 01:1B:19:00:00:00
            p2p_dst_mac 01:80:C2:00:00:0E
            udp_ttl 1
            udp6_scope 0x0E
            uds_address /var/run/ptp4l
            #
            # Default interface options
            #
            clock_type OC
            network_transport L2
            delay_mechanism E2E
            time_stamping hardware
            tsproc_mode filter
            delay_filter moving_median
            delay_filter_length 10
            egressLatency 0
            ingressLatency 0
            boundary_clock_jbod 0
            #
            # Clock description
            #
            productDescription ;;
            revisionData ;;
            manufacturerIdentity 00:00:00
            userDescription ;
            timeSource 0xA0
      recommend:
        - profile: ordinary-clock
          priority: 4
          match:
            - nodeLabel: "node-role.kubernetes.io/$mcp"

    표 19.9. PTP 일반 클럭 CR 구성 옵션
    CR 필드설명

    name

    PtpConfig CR의 이름입니다.

    profile

    하나 이상의 profile 오브젝트의 배열을 지정합니다. 각 프로필의 이름은 고유해야 합니다.

    인터페이스

    ptp4l 서비스에서 사용할 네트워크 인터페이스를 지정합니다(예: ens787f1 ).

    ptp4lOpts

    ptp4l 서비스에 대한 시스템 구성 옵션을 지정합니다(예: - 2)는 IEEE 802.3 네트워크 전송을 선택합니다. 옵션은 네트워크 인터페이스 이름과 서비스 구성 파일이 자동으로 추가되므로 네트워크 인터페이스 이름 -i <interface> 및 서비스 구성 파일 -f /etc/ptp4l.conf를 포함하지 않아야 합니다. 이 인터페이스에서 PTP 빠른 이벤트를 사용하려면 --summary_interval -4 를 추가합니다.

    phc2sysOpts

    phc2sys 서비스에 대한 시스템 구성 옵션을 지정합니다. 이 필드가 비어 있으면 PTP Operator에서 phc2sys 서비스를 시작하지 않습니다. Intel Columbiaville 800 시리즈 NIC의 경우 phc2sysOpts 옵션을 -a -r -m -n 24 -N 8 -R 16 으로 설정합니다. -m 은 메시지를 stdout 에 출력합니다. linuxptp-daemon DaemonSet 은 로그를 구문 분석하고 Prometheus 지표를 생성합니다.

    ptp4lConf

    기본 /etc/ptp4l.conf 파일을 대체할 구성이 포함된 문자열을 지정합니다. 기본 구성을 사용하려면 필드를 비워 둡니다.

    tx_timestamp_timeout

    Intel Columbiaville 800 시리즈 NIC의 경우 tx_timestamp_timeout50 으로 설정합니다.

    boundary_clock_jbod

    Intel Columbiaville 800 시리즈 NIC의 경우 boundary_clock_jbod0 으로 설정합니다.

    ptpSchedulingPolicy

    ptp4lphc2sys 프로세스에 대한 스케줄링 정책. 기본값은 Cryo stat_OTHER 입니다. FIFO 스케줄링을 지원하는 시스템에서 Cryostat _FIFO 를 사용합니다.

    ptpSchedulingPriority

    ptpSchedulingPolicy 가 Cryostat _FIFO 로 설정된 경우 ptp4lphc2sys 프로세스의 FIFO 우선 순위를 설정하는 데 사용되는 1-65의 정수 값입니다. ptpSchedulingPolicy 가 ptpSchedulingPolicy로 설정된 경우 ptpSchedulingPriority 필드는 사용되지 않습니다.

    ptpClockThreshold

    선택 사항: ptpClockThreshold 가 없으면 ptpClockThreshold 필드에 기본값이 사용됩니다. ptpClockThreshold 는 PTP 이벤트가 트리거되기 전에 PTP 마스터 클록의 연결이 해제된 후의 시간을 구성합니다. holdOverTimeout 은 PTP 마스터 클록의 연결이 끊어지면 PTP 클럭 이벤트 상태가 Free RUN 으로 변경되기 전의 시간(초)입니다. maxOffsetThresholdminOffsetThreshold 설정은 CLOCK_REALTIME (phc2sys) 또는 master 오프셋(ptp4l)의 값과 비교하는 오프셋 값을 나노초로 구성합니다. ptp4l 또는 phc2sys 오프셋 값이 이 범위를 벗어나는 경우 PTP 클럭 상태가 Free RUN으로 설정됩니다. 오프셋 값이 이 범위 내에 있으면 PTP 클럭 상태가 LOCKED 로 설정됩니다.

    권장

    프로필 을 노드에 적용하는 방법에 대한 규칙을 정의하는 하나 이상의 recommend 오브젝트 배열을 지정합니다.

    .recommend.profile

    profile 섹션에 정의된 .recommend. profile 오브젝트 이름을 지정합니다.

    .recommend.priority

    일반 클록의 경우 .recommend.priority0 으로 설정합니다.

    .recommend.match

    nodeLabel 또는 nodeName 값을 사용하여 .recommend.match 규칙을 지정합니다.

    .recommend.match.nodeLabel

    oc get nodes --show-labels 명령을 사용하여 노드 오브젝트에서 node.Labels 필드의 키로 nodeLabel 을 설정합니다. 예: node-role.kubernetes.io/worker.

    .recommend.match.nodeName

    oc get nodes 명령을 사용하여 노드 오브젝트의 node.Name 필드 값으로 nodeName 을 설정합니다. 예를 들면 compute-1.example.com 입니다.

  2. 다음 명령을 실행하여 PtpConfig CR을 생성합니다.

    $ oc create -f ordinary-clock-ptp-config.yaml

검증

  1. PtpConfig 프로필이 노드에 적용되었는지 확인합니다.

    1. 다음 명령을 실행하여 openshift-ptp 네임스페이스에서 Pod 목록을 가져옵니다.

      $ oc get pods -n openshift-ptp -o wide

      출력 예

      NAME                            READY   STATUS    RESTARTS   AGE   IP               NODE
      linuxptp-daemon-4xkbb           1/1     Running   0          43m   10.1.196.24      compute-0.example.com
      linuxptp-daemon-tdspf           1/1     Running   0          43m   10.1.196.25      compute-1.example.com
      ptp-operator-657bbb64c8-2f8sj   1/1     Running   0          43m   10.129.0.61      control-plane-1.example.com

    2. 프로필이 올바른지 확인합니다. PtpConfig 프로필에 지정한 노드에 해당하는 linuxptp 데몬의 로그를 검사합니다. 다음 명령을 실행합니다.

      $ oc logs linuxptp-daemon-4xkbb -n openshift-ptp -c linuxptp-daemon-container

      출력 예

      I1115 09:41:17.117596 4143292 daemon.go:107] in applyNodePTPProfile
      I1115 09:41:17.117604 4143292 daemon.go:109] updating NodePTPProfile to:
      I1115 09:41:17.117607 4143292 daemon.go:110] ------------------------------------
      I1115 09:41:17.117612 4143292 daemon.go:102] Profile Name: profile1
      I1115 09:41:17.117616 4143292 daemon.go:102] Interface: ens787f1
      I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2 -s
      I1115 09:41:17.117623 4143292 daemon.go:102] Phc2sysOpts: -a -r -n 24
      I1115 09:41:17.117626 4143292 daemon.go:116] ------------------------------------

19.2.8.1. Intel Columbiaville E800 시리즈 NIC를 PTP 일반 클럭 참조

다음 표에서는 Intel Columbiaville E800 시리즈 NIC를 일반 클록으로 사용하기 위해 참조 PTP 구성에 대해 설명합니다. 클러스터에 적용하는 PtpConfig CR(사용자 정의 리소스)을 변경합니다.

표 19.10. Intel Columbiaville NIC에 권장되는 PTP 설정
PTP 구성권장 설정

phc2sysOpts

-a -r -m -n 24 -N 8 -R 16

tx_timestamp_timeout

50

boundary_clock_jbod

0

참고

phc2sysOpts 의 경우-m 은 메시지를 stdout 에 출력합니다. linuxptp-daemon DaemonSet 은 로그를 구문 분석하고 Prometheus 지표를 생성합니다.

추가 리소스

19.2.9. PTP 하드웨어에 대한 FIFO 우선순위 스케줄링 구성

대기 시간이 짧은 통신 또는 기타 배포 유형에서는 PTP 데몬 스레드는 나머지 인프라 구성 요소와 함께 제한된 CPU 풋프린트에서 실행됩니다. 기본적으로 PTP 스레드는 Cryostat _OTHER 정책으로 실행됩니다. 로드가 높은 상태에서 이러한 스레드는 오류가 없는 작업에 필요한 스케줄링 대기 시간을 얻지 못할 수 있습니다.

잠재적인 스케줄링 대기 시간 오류를 완화하기 위해 PTP Operator linuxptp 서비스를 구성하여 스레드가 a Cryostat _FIFO 정책으로 실행되도록 할 수 있습니다. PtpConfig CR에 대해 Cryostat _FIFO 가 설정된 경우 ptp4lphc2sysPtpConfig CR의 ptpSchedulingPriority 필드에 의해 설정된 우선순위를 가진 chrt 아래의 상위 컨테이너에서 실행됩니다.

참고

ptpSchedulingPolicy 설정은 선택 사항이며 대기 시간 오류가 발생하는 경우에만 필요합니다.

프로세스

  1. PtpConfig CR 프로필을 편집합니다.

    $ oc edit PtpConfig -n openshift-ptp
  2. ptpSchedulingPolicyptpSchedulingPriority 필드를 변경합니다.

    apiVersion: ptp.openshift.io/v1
    kind: PtpConfig
    metadata:
      name: <ptp_config_name>
      namespace: openshift-ptp
    ...
    spec:
      profile:
      - name: "profile1"
    ...
        ptpSchedulingPolicy: SCHED_FIFO 1
        ptpSchedulingPriority: 10 2
    1
    ptp4lphc2sys 프로세스에 대한 스케줄링 정책. FIFO 스케줄링을 지원하는 시스템에서 Cryostat _FIFO 를 사용합니다.
    2
    필수 항목입니다. ptp4lphc2sys 프로세스의 FIFO 우선 순위를 구성하는 데 사용되는 정수 값 1-65를 설정합니다.
  3. 저장하고 종료하여 PtpConfig CR에 변경 사항을 적용합니다.

검증

  1. linuxptp-daemon Pod의 이름과 PtpConfig CR이 적용된 해당 노드를 가져옵니다.

    $ oc get pods -n openshift-ptp -o wide

    출력 예

    NAME                            READY   STATUS    RESTARTS   AGE     IP            NODE
    linuxptp-daemon-gmv2n           3/3     Running   0          1d17h   10.1.196.24   compute-0.example.com
    linuxptp-daemon-lgm55           3/3     Running   0          1d17h   10.1.196.25   compute-1.example.com
    ptp-operator-3r4dcvf7f4-zndk7   1/1     Running   0          1d7h    10.129.0.61   control-plane-1.example.com

  2. 업데이트된 chrt FIFO 우선 순위로 ptp4l 프로세스가 실행 중인지 확인합니다.

    $ oc -n openshift-ptp logs linuxptp-daemon-lgm55 -c linuxptp-daemon-container|grep chrt

    출력 예

    I1216 19:24:57.091872 1600715 daemon.go:285] /bin/chrt -f 65 /usr/sbin/ptp4l -f /var/run/ptp4l.0.config -2  --summary_interval -4 -m

19.2.10. linuxptp 서비스에 대한 로그 필터링 구성

linuxptp 데몬은 디버깅을 위해 사용할 수 있는 로그를 생성합니다. 제한된 스토리지 용량을 제공하는 통신 또는 기타 배포 유형에서는 이러한 로그가 스토리지 요구에 추가할 수 있습니다.

수 로그 메시지를 줄이기 위해 마스터 오프셋 값을 보고하는 로그 메시지를 제외하도록 PtpConfig CR(사용자 정의 리소스)을 구성할 수 있습니다. 마스터 오프셋 로그 메시지는 현재 노드의 클록과 나노초의 마스터 클록의 차이를 보고합니다.

사전 요구 사항

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

프로세스

  1. PtpConfig CR을 편집합니다.

    $ oc edit PtpConfig -n openshift-ptp
  2. spec.profile 에서 ptpSettings.logReduce 사양을 추가하고 값을 true 로 설정합니다.

    apiVersion: ptp.openshift.io/v1
    kind: PtpConfig
    metadata:
      name: <ptp_config_name>
      namespace: openshift-ptp
    ...
    spec:
      profile:
      - name: "profile1"
    ...
        ptpSettings:
          logReduce: "true"
    참고

    디버깅을 위해 이 사양을 False 로 되돌리고 마스터 오프셋 메시지를 포함할 수 있습니다.

  3. 저장하고 종료하여 PtpConfig CR에 변경 사항을 적용합니다.

검증

  1. linuxptp-daemon Pod의 이름과 PtpConfig CR이 적용된 해당 노드를 가져옵니다.

    $ oc get pods -n openshift-ptp -o wide

    출력 예

    NAME                            READY   STATUS    RESTARTS   AGE     IP            NODE
    linuxptp-daemon-gmv2n           3/3     Running   0          1d17h   10.1.196.24   compute-0.example.com
    linuxptp-daemon-lgm55           3/3     Running   0          1d17h   10.1.196.25   compute-1.example.com
    ptp-operator-3r4dcvf7f4-zndk7   1/1     Running   0          1d7h    10.129.0.61   control-plane-1.example.com

  2. 다음 명령을 실행하여 마스터 오프셋 메시지가 로그에서 제외되었는지 확인합니다.

    $ oc -n openshift-ptp logs <linux_daemon_container> -c linuxptp-daemon-container | grep "master offset" 1
    1
    <linux_daemon_container>는 linuxptp-daemon Pod의 이름입니다(예: linuxptp-daemon-gmv2n ).

    logReduce 사양을 구성할 때 이 명령은 linuxptp 데몬의 로그에 마스터 오프셋 의 인스턴스를 보고하지 않습니다.

19.2.11. 일반적인 PTP Operator 문제 해결

다음 단계를 수행하여 PTP Operator의 일반적인 문제를 해결합니다.

사전 요구 사항

  • OpenShift Container Platform CLI (oc)를 설치합니다.
  • cluster-admin 권한이 있는 사용자로 로그인합니다.
  • PTP를 지원하는 호스트가 있는 베어 메탈 클러스터에 PTP Operator를 설치합니다.

프로세스

  1. 구성된 노드를 위해 Operator 및 Operand가 클러스터에 성공적으로 배포되었는지 확인합니다.

    $ oc get pods -n openshift-ptp -o wide

    출력 예

    NAME                            READY   STATUS    RESTARTS   AGE     IP            NODE
    linuxptp-daemon-lmvgn           3/3     Running   0          4d17h   10.1.196.24   compute-0.example.com
    linuxptp-daemon-qhfg7           3/3     Running   0          4d17h   10.1.196.25   compute-1.example.com
    ptp-operator-6b8dcbf7f4-zndk7   1/1     Running   0          5d7h    10.129.0.61   control-plane-1.example.com

    참고

    PTP 빠른 이벤트 버스가 활성화되면 준비된 linuxptp-daemon Pod 수는 3/3가 됩니다. PTP 빠른 이벤트 버스가 활성화되지 않으면 2/2가 표시됩니다.

  2. 지원되는 하드웨어가 클러스터에 있는지 확인합니다.

    $ oc -n openshift-ptp get nodeptpdevices.ptp.openshift.io

    출력 예

    NAME                                  AGE
    control-plane-0.example.com           10d
    control-plane-1.example.com           10d
    compute-0.example.com                 10d
    compute-1.example.com                 10d
    compute-2.example.com                 10d

  3. 노드에 사용 가능한 PTP 네트워크 인터페이스를 확인합니다.

    $ oc -n openshift-ptp get nodeptpdevices.ptp.openshift.io <node_name> -o yaml

    다음과 같습니다.

    <node_name>

    쿼리할 노드를 지정합니다 (예: compute-0.example.com).

    출력 예

    apiVersion: ptp.openshift.io/v1
    kind: NodePtpDevice
    metadata:
      creationTimestamp: "2021-09-14T16:52:33Z"
      generation: 1
      name: compute-0.example.com
      namespace: openshift-ptp
      resourceVersion: "177400"
      uid: 30413db0-4d8d-46da-9bef-737bacd548fd
    spec: {}
    status:
      devices:
      - name: eno1
      - name: eno2
      - name: eno3
      - name: eno4
      - name: enp5s0f0
      - name: enp5s0f1

  4. 해당 노드의 linuxptp-daemon Pod에 액세스하여 PTP 인터페이스가 기본 클록에 성공적으로 동기화되었는지 확인합니다.

    1. 다음 명령을 실행하여 linuxptp-daemon Pod의 이름과 문제를 해결하려는 해당 노드를 가져옵니다.

      $ oc get pods -n openshift-ptp -o wide

      출력 예

      NAME                            READY   STATUS    RESTARTS   AGE     IP            NODE
      linuxptp-daemon-lmvgn           3/3     Running   0          4d17h   10.1.196.24   compute-0.example.com
      linuxptp-daemon-qhfg7           3/3     Running   0          4d17h   10.1.196.25   compute-1.example.com
      ptp-operator-6b8dcbf7f4-zndk7   1/1     Running   0          5d7h    10.129.0.61   control-plane-1.example.com

    2. 필수 linuxptp-daemon 컨테이너로의 원격 쉘:

      $ oc rsh -n openshift-ptp -c linuxptp-daemon-container <linux_daemon_container>

      다음과 같습니다.

      <linux_daemon_container>
      진단할 컨테이너입니다 (예: linuxptp-daemon-lmvgn).
    3. linuxptp-daemon 컨테이너에 대한 원격 쉘 연결에서 PTP 관리 클라이언트(pmc) 툴을 사용하여 네트워크 인터페이스를 진단합니다. 다음 pmc 명령을 실행하여 PTP 장치의 동기화 상태를 확인합니다(예: ptp4l ).

      # pmc -u -f /var/run/ptp4l.0.config -b 0 'GET PORT_DATA_SET'

      노드가 기본 클록에 성공적으로 동기화되었을 때의 출력 예

      sending: GET PORT_DATA_SET
          40a6b7.fffe.166ef0-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
              portIdentity            40a6b7.fffe.166ef0-1
              portState               SLAVE
              logMinDelayReqInterval  -4
              peerMeanPathDelay       0
              logAnnounceInterval     -3
              announceReceiptTimeout  3
              logSyncInterval         -4
              delayMechanism          1
              logMinPdelayReqInterval -4
              versionNumber           2

  5. GNSS 소싱 할 마스터 클록의 경우 in-tree NIC 아이스크림 드라이버가 다음 명령을 실행하여 올바른지 확인합니다. 예를 들면 다음과 같습니다.

    $ oc rsh -n openshift-ptp -c linuxptp-daemon-container linuxptp-daemon-74m2g ethtool -i ens7f0

    출력 예

    driver: ice
    version: 5.14.0-356.bz2232515.el9.x86_64
    firmware-version: 4.20 0x8001778b 1.3346.0

  6. GNSS 소싱된 마스터 클록의 경우 linuxptp-daemon 컨테이너가 GNSS radio에서 신호를 수신하고 있는지 확인합니다. 컨테이너가 GNSS 신호를 수신하지 않으면 /dev/gnss0 파일이 채워지지 않습니다. 확인하려면 다음 명령을 실행합니다.

    $ oc rsh -n openshift-ptp -c linuxptp-daemon-container linuxptp-daemon-jnz6r cat /dev/gnss0

    출력 예

    $GNRMC,125223.00,A,4233.24463,N,07126.64561,W,0.000,,300823,,,A,V*0A
    $GNVTG,,T,,M,0.000,N,0.000,K,A*3D
    $GNGGA,125223.00,4233.24463,N,07126.64561,W,1,12,99.99,98.6,M,-33.1,M,,*7E
    $GNGSA,A,3,25,17,19,11,12,06,05,04,09,20,,,99.99,99.99,99.99,1*37
    $GPGSV,3,1,10,04,12,039,41,05,31,222,46,06,50,064,48,09,28,064,42,1*62

19.2.12. PTP Operator 데이터 수집

oc adm must-gather 명령을 사용하여 PTP Operator와 관련된 기능 및 오브젝트를 포함하여 클러스터에 대한 정보를 수집할 수 있습니다.

사전 요구 사항

  • cluster-admin 역할의 사용자로 클러스터에 액세스할 수 있어야 합니다.
  • OpenShift CLI(oc)가 설치되어 있습니다.
  • PTP Operator를 설치했습니다.

프로세스

  • must-gather 를 사용하여 PTP Operator 데이터를 수집하려면 PTP Operator must-gather 이미지를 지정해야 합니다.

    $ oc adm must-gather --image=registry.redhat.io/openshift4/ptp-must-gather-rhel8:v4.14
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.