PTP cannot lock to master when configured with bonded interface

Bug #1973201 reported by Douglas Henrique Koerich
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Douglas Henrique Koerich

Bug Description

Brief Description
-----------------
Setting PTP role in bond interface cause PTP unlock.

Severity
--------
Major

Steps to Reproduce
------------------
- Create bond interface;
- Set ptp-role of bond interface as "slave";
- Create PTP instances (ptp4l and phc2sys) and associated PTP interface, assigning this last one to bond interface;
- Verify PTP isn't locked/synchronized via that interface.

Expected Behavior
------------------
After enabling PTP at the bond interface, it should lock/synchronize.

Actual Behavior
----------------
PTP is unlocked.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Two node system or standard where a bond interface can be created and PTP master/slave interfaces can be setup.

Branch/Pull Time/Commit
-----------------------
master

Last Pass
---------
For some reason this has not been validated yet.

Timestamp/Logs
--------------
2022-05-11T19:01:16.000 compute-1 ptp4l: info [117.883] ptp0 selected /dev/ptp6 as PTP clock
2022-05-11T19:01:16.000 compute-1 ptp4l: warning [117.883] ptp0 port 2: just a bunch of devices <-- because slave interfaces are named in ptp4l.conf instead of the bond itself
(...)
2022-05-11T19:01:17.000 compute-1 phc2sys: info [119.008] phc0 selecting ens787f1 for synchronization
2022-05-11T19:01:17.000 compute-1 phc2sys: info [119.008] phc0 selecting ens787f2 for synchronization
(...)
2022-05-11T19:01:23.000 compute-1 ptp4l: err [124.672] ptp0 port 1: received SYNC without timestamp
2022-05-11T19:01:24.000 compute-1 ptp4l: err [125.672] ptp0 port 2: received SYNC without timestamp
(...)

Test Activity
-------------
Evaluation

Workaround
----------
Manually replace the slave interfaces by bond (master) interface in the ptp4l configuration file.

Changed in starlingx:
assignee: nobody → Douglas Henrique Koerich (dkoerich-wr)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/841623
Committed: https://opendev.org/starlingx/config/commit/58febb67bc5210192f21f9550166d2688b7ec5ce
Submitter: "Zuul (22348)"
Branch: master

commit 58febb67bc5210192f21f9550166d2688b7ec5ce
Author: Douglas Henrique Koerich <email address hidden>
Date: Thu May 12 14:36:49 2022 -0300

    Use bonded interface name in ptp4l configuration

    Although linuxptp already supports bonded interfaces since version
    1.9.2, the slave interfaces have been named in the ptp4l service
    configuration file. Because of this, when PTP is enabled through a
    bonded interface, it remains unlocked and error messages can be seen in
    both sides of LAG.
    This change allows the bonded interface name to be referred directly by
    the corresponding ptp4l configuration file. Moreover, it has been
    observed that only "active_standby" mode of LAG is actually accepted by
    ptp4l service, therefore a semantic check to constrain the AE mode is
    also introduced.
    Finally, some code for applying legacy PTP configuration (deprecated)
    was also removed.

    Test Plan:
    PASS: New unit test cases for the scenario of having PTP on top of
          bonded interface
    PASS: Bonding+PTP configuration in fresh install using VM setup
    PASS: Check for PTP lock through bond interface in hardware setup

    Closes-Bug: 1973201
    Signed-off-by: Douglas Henrique Koerich <email address hidden>
    Change-Id: Ic5c20c56dd220d8887518d40096ca89039818bd8

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.7.0 stx.networking
summary: - PTP unlock in bond interface
+ PTP cannot lock to master when configured with bonded interface
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.