NTP time not correctly set during boot for WRS fw 6.0 in GM mode
[based on input from wr-dev forum]
After upgrading our switches to fw 6.0, I noticed that switch time and coarse part of the WR time are incorrectly set using ntp during boot when running the WRS in GM mode.
In wr_mon I might see something like this:
WR time (TAI) : 2020-09-08 11:53:44.010192 Leap seconds: 37 Switch time (UTC): 2020-09-08 11:53:06.928539 TAI-UTC : +37.081653
Firstly: fractional part 0.081653 varies boot-to-boot, and is occasionally correctly set to ~zero (maybe half of the time).
Secondly: even if TAI-UTC is close to 37, switch time might offset from real UTC by an integer number of seconds (I’ve seen ±1 or ±2 s between boots).
Ntp server is one of our stratum 1 servers (Meinberg M300), and 10 MHz and 1 PPS references come from a hydrogen maser. Ntp server and maser continuously monitored against other clock sources and function correctly.
Manually running /etc/init.d/wr_date after boot reports something like:
ntpd: sending query to
ntpd: reply from : offset:-1.918205 delay:0.002000 status:0x24 strat:1 refid:0x0053524d rootdelay:0.000000 reach:0x01
ntpd: sending query to
ntpd: reply from : offset:-1.918271 delay:0.002000 status:0x24 strat:1 refid:0x0053524d rootdelay:0.000000 reach:0x03
ntpd: setting time to 2020-09-08 11:53:17.688510 (offset -1.918271s)
NTP success
Set WR time for grand master.
Current TAI offset: 37
Driver module wr_clocksource removed.
Host time: 1599565998.510562
WR time: 1599566037.510535
TAI(HW)-UTC(SW): +38.999973
UTC(HW)-UTC(SW): +1.999973
adjusting by -2 seconds
WR time adjustment: waiting.
WR time adjustment: waiting.
WR time adjustment: waiting.
WR time adjustment: done.
Driver module wr_clocksource installed.
Host time: 1599566001.526432
WR time: 1599566038.526413
TAI(HW)-UTC(SW): +36.999981
UTC(HW)-UTC(SW): -0.000019
Here the offset is -1.918271 before adjustment. Fractional part corresponds to ~0.081653 reported above. Additionally, the total adjustment is -2 seconds.
Afterwards wr_mon shows correct time, and PPS output of the switch seems unaffected by the wr_date -script.
So, all in all this seems like a good manual workaround, but what might be causing this, and can something be done to mitigate the problem? Ntp seems to work fine manually, so it’s probably not a network problem.