Description of problem: When applied ptp configuration with summary_interval you get and error, and the configuration isn't applied. Example of tested yaml. apiVersion: ptp.openshift.io/v1 kind: PtpConfig metadata: name: master namespace: openshift-ptp spec: profile: - name: discovery-master interface: ens5f0 ptp4lOpts: "-2 --summary_interval -4" phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" ptp4lConf: | [global] # # Default Data Set # twoStepFlag 1 slaveOnly 0 priority1 128 priority2 128 domainNumber 0 #utc_offset 37 clockClass 248 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 dscp_event 0 dscp_general 0 dataset_comparison ieee1588 G.8275.defaultDS.localPriority 128 # # Port Data Set # logAnnounceInterval -3 logSyncInterval 0 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 1 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 # # 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 0.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 UDPv4 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: discovery-master priority: 5 match: - nodeLabel: ptp/master Version-Release number of selected component (if applicable): How reproducible: oc apply -f /home/obochan/Documents/PTP/ptpConfigMaster.yaml Error from server (summary_interval -4 must match logSyncInterval 0): error when creating "/home/obochan/Documents/PTP/ptpConfigMaster.yaml": admission webhook "ptpconfigvalidationwebhook.openshift.io" denied the request: summary_interval -4 must match logSyncInterval 0 [obochan@obochan artifacts]$ oc get ptpconfigs.ptp.openshift.io -n openshift-ptp No resources found in openshift-ptp namespace. i have tried removing the log interval and changing to -4 and 0 but keep getting the same error. Actual results: Failed - to applied ptp configuration Expected results: Pass - configuration should be applied.
https://github.com/openshift/ptp-operator/blob/953e3070a9665ab51e7c22b1e3d033d6cd0fad50/api/v1/ptpconfig_webhook.go#L111 It compares strings, so if you have some spaces it will think these are not the same numbers.
Error from server (summary_interval -4 must match logSyncInterval -4): error when creating "ptpConfigOrdClock.yaml": admission webhook "ptpconfigvalidationwebhook.openshift.io" denied the request: summary_interval -4 must match logSyncInterval -4
It is intended behaviour to reject when summary_interval and logSyncInterval don't match. I will update to remove extra whitespace characters, so it doesn't reject ' -4'.
issue doesn't reproduce in version Server Version: 4.10.0-0.nightly-2021-12-21-130047 Kubernetes Version: v1.22.1+6859754 Please advise if the fix is included in this version
issue is verified and was reproducible via version: [obochan@obochan policygentemplates]$ oc get ptpconfigs.ptp.openshift.io -n openshift-ptp NAME AGE du-ptp-slave 22h master 2m1s Server Version: 4.10.0-0.nightly-2021-12-14-122508 Kubernetes Version: v1.22.1+6859754 [obochan@obochan policygentemplates]$ oc apply -f /home/obochan/Documents/PTP/ptpConfigMaster.yaml ptpconfig.ptp.openshift.io/master created [obochan@obochan policygentemplates]$ cat /home/obochan/Documents/PTP/ptpConfigMaster.yaml apiVersion: ptp.openshift.io/v1 kind: PtpConfig metadata: name: master namespace: openshift-ptp spec: profile: - name: discovery-master interface: ens5f1 ptp4lOpts: "-2 --summary_interval -4" phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" ptp4lConf: | [global] # # Default Data Set # twoStepFlag 1 slaveOnly 0 priority1 128 priority2 128 domainNumber 0 #utc_offset 37 clockClass 248 clockAccuracy 0xFE offsetScaledLogVariance 0xFFFF free_running 0 freq_est_interval 1 dscp_event 0 dscp_general 0 dataset_comparison ieee1588 G.8275.defaultDS.localPriority 128 # # Port Data Set # logAnnounceInterval -3 logMinDelayReqInterval -4 logMinPdelayReqInterval -4 logSyncInterval -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 1 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 # # 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 0.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 UDPv4 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 #ptpSchedulingPolicy SCHED_FIFO #ptpSchedulingPriority 65 recommend: - profile: discovery-master priority: 5 match: - nodeLabel: ptp/master [obochan@obochan policygentemplates]$
Have another incident of this in a 4.9 deployment. summary_interval is set to 6 and logSyncInterval is set to -4. Receiving the same error re: the webhook. What problem/issue/behavior are you having trouble with? What do you expect to see? When using "summary_interval 6" in a PtpConfig the ptpconfigvalidationwebhook returns an error ======================================================================= Error from server (summary_interval 6 must match logSyncInterval -4): error when creating "04-PtpConfigBC.yaml": admission webhook "ptpconfigvalidationwebhook.openshift.io" denied the request: summary_interval 6 must match logSyncInterval -4 ======================================================================= This is a perfectly valid configuration though. summary_interval does not at all have to match logSyncInterval according to the ptp4l manual page. The PtpConfig file is the following: ======================================================================= apiVersion: ptp.openshift.io/v1 kind: PtpConfig metadata: name: boundary namespace: openshift-ptp spec: profile: - name: "boundary" interface: "" ptp4lOpts: "-2 --summary_interval 6" phc2sysOpts: "-a -r -n 24" ptp4lConf: | [ens1f0] masterOnly 0 [ens1f1] masterOnly 1 [ens1f2] masterOnly 1 [global] slaveOnly 0 priority1 128 domainNumber 24 boundary_clock_jbod 1 logAnnounceInterval -3 delay_mechanism E2E network_transport L2 tx_timestamp_timeout 50 dataset_comparison G.8275.x time_stamping hardware clockClass 255 logSyncInterval -4 logMinDelayReqInterval -4 fault_reset_interval 0 priority2 128 clock_servo linreg recommend: - profile: "boundary" priority: 4 match: - nodeLabel: "node-role.kubernetes.io/master"
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:0056