PTP When ts2phc configured on same host, ptp4l on another NIC will not raise alarm for ptp no-lock

Bug #2070071 reported by Andre Mauricio Zelak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Andre Mauricio Zelak

Bug Description

Brief Description
-----------------
When ts2phc configured on same host, ptp4l on another NIC will not raise alarm for ptp no-lock.

This is an unusual configuration hence the minor severity.

Severity
--------
Minor

Steps to Reproduce
------------------
1. Configure two ptp4l instances, one whose interfaces are on a NIC disciplined
by a GNSS 1PPS clock (ptp4l-inst1), and the the other ptp4l instance
(ptp4l-inst2) whose interfaces are on a NIC not displined by neither
a GNSS nor a SMA1 clock.
2. Configure a phc2sys and set the nmea serial port to the NIC displined by GNSS.
It's important to set the nmea serial port, so a primary NIC is configured.
Start remote PTP sources for both ptp4l instances.
3. Remove remote PTP source for inst1.

Expected Behavior
------------------
ptp4l-inst1 "not locked to remote PTP Grand Master" alarm is raised.

Actual Behavior
----------------
No "not locked to remote PTP Grand Master" raised.

Reproducibility
---------------
100%

System Configuration
--------------------
All

Branch/Pull Time/Commit
-----------------------
Found on 22.12 MR2, but affects older and later version as well.

Last Pass
---------
Unknown

Timestamp/Logs
--------------
alarm

[sysadmin@controller-0 ~(keystone_admin)]$ fm alarm-list
+----------+----------------------------------------------------------------------+--------------------+----------+--------------+
| Alarm ID | Reason Text | Entity ID | Severity | Time Stamp |
+----------+----------------------------------------------------------------------+--------------------+----------+--------------+
| 100.119 | controller-1 Precision Time Protocol (PTP) clocking is out of | host=controller-1. | minor | 2024-03-21T1 |
| | tolerance by 79.196 microsecs | instance=ptp4.ptp= | | 5:32:31. |
| | | out-of-tolerance | | 949867 |
| | | | | |
| 100.119 | controller-1 Precision Time Protocol (PTP) clocking is out of | host=controller-1. | minor | 2024-03-21T1 |
| | tolerance by 79.147 microsecs | instance=ptp1.ptp= | | 5:32:31. |
| | | out-of-tolerance | | 395956 |
| | | | | |
PTP status (first port changed from SLAVE to MASTER)

controller-1:~$ sudo pmc -u -b 0 -f /etc/linuxptp/ptpinstance/ptp4l-ptp4.conf -s /var/run/ptp4l-ptp4 'GET PORT_DATA_SET'
Password:
sending: GET PORT_DATA_SET
 507c6f.fffe.21b414-1 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
  portIdentity 507c6f.fffe.21b414-1
  portState MASTER
  logMinDelayReqInterval 0
  peerMeanPathDelay 0
  logAnnounceInterval 1
  announceReceiptTimeout 3
  logSyncInterval 0
  delayMechanism 1
  logMinPdelayReqInterval 0
  versionNumber 2
 507c6f.fffe.21b414-2 seq 0 RESPONSE MANAGEMENT PORT_DATA_SET
  portIdentity 507c6f.fffe.21b414-2
  portState MASTER
  logMinDelayReqInterval 0
  peerMeanPathDelay 0
  logAnnounceInterval 1
  announceReceiptTimeout 3
  logSyncInterval 0
  delayMechanism 1
  logMinPdelayReqInterval 0
  versionNumber 2

Test Activity
-------------
Feature testing.

Workaround
----------
None.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to monitoring (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/monitoring/+/922514

Changed in starlingx:
status: New → In Progress
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0 stx.networking
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to monitoring (master)

Reviewed: https://review.opendev.org/c/starlingx/monitoring/+/922514
Committed: https://opendev.org/starlingx/monitoring/commit/a1d13a000f0aca3ff467050146aef5bd91a73564
Submitter: "Zuul (22348)"
Branch: master

commit a1d13a000f0aca3ff467050146aef5bd91a73564
Author: Andre Mauricio Zelak <email address hidden>
Date: Fri Jun 21 16:20:16 2024 -0300

    Fix not locked to remote PTP Grand Master alarm

    Fix the not locked to remote PTP Grand Master alarm raise logic. Even
    when the NMEA serial port is set for a given network interface card,
    the other NICs can be undisciplined by a local clock source. For those
    cases where the NIC isn't locked to a clock source the PTP status is
    checked, and the corresponding alarms are raised.

    Test Plan:
    Configure two ptp4l instances, one whose interfaces are on a NIC
    disciplined by a GNSS 1PPS clock (ptp4l-inst1), and the the other
    ptp4l instance (ptp4l-inst2) whose interfaces are on a NIC not
    displined by neither a GNSS nor a SMA1 clock.
    Configure a phc2sys and set the nmea serial port to the NIC
    displined by GNSS. It's important to set the nmea serial port,
    so a primary NIC is configured.
    Start remote PTP sources for both ptp4l instances.

    Pass: At start, as ptp4l-inst2 is not disciplined by local clock source
    check the 1PPS signal loss state alarm is set.
    Pass: Remove the remove GM connected to ptp4l-inst2 and check the not
    locked to remote PTP Grand Master alarm is raised.
    Pass: After some minutes, check the Precision Time Protocol (PTP)
    clocking is out of tolerance alarm for ptp-inst2 is set.
    Pass: Configure SMA1 local clock on the NIC linked to ptp4l-inst2, and
    check both not locked to remote PTP Grand Master and the 1PPS signal
    loss state alarms are cleared.
    Pass: Remove the SMA1 configuration on the NIC linked to ptp4l-inst2,
    and check both not locked to remote PTP Grand Master and the 1PPS
    signal loss state alarms are raised.
    Pass: Start the remote PTP connected to ptp4l-inst2 and check not
    locked to remote PTP Grand Master alarm is cleared.
    Pass: Remove the remote PTP connected to ptp4l-inst1. As it is
    disciplined by a local source, check no alarms are raised. Than
    restart the remote PTP.

    Closes-Bug: 2070071

    Change-Id: I82c0c745d65817a02d921d61e87c91c7aa3aae43
    Signed-off-by: Andre Mauricio Zelak <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Andre Mauricio Zelak (azelak)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.