On 06/07/2015 11:01 AM, Mike Cook wrote:
Hi,
  As part of getting ready for the end of the world as we know it I just 
upgraded  a BBB to 4.2.8p3 and discovered that the leap_armed system status is 
not updated if a leapsecond file is loaded dynamically.

Here’s the trace:

I restarted ntpd after a build and installing a leap second file. The log 
showed that the leapsecond file was not picked up.

Jun  6 22:10:10 bb2 ntpd[1469]: Listen normally on 5 eth0 
[fe80::7aa5:4ff:fecc:d05d%2]:123
Jun  6 22:10:10 bb2 ntpd[1469]: Listening on routing socket on fd #22 for 
interface updates
Jun  6 22:10:10 bb2 ntpd[1469]: leapsecond file ('/etc/ntp/leapdir/leapsecs'): 
stat failed: No such file or directory
Jun  6 22:10:13 bb2 ntpd[1469]: Soliciting pool server 85.21.78.91

I then corrected the error, which was due to a finger check on the directory 
name and waited for ntpd to pick up the now available file, which it did an 
hour later.

Jun  6 23:10:10 bb2 ntpd[1469]: leapsecond file ('/etc/ntp/leapdir/leapsecs'): 
loaded, expire=2015-12-01T00:00Z last=2015-07-01T00:00Z ofs=36

I thought that would be the end of the story, but a routine check this morning 
showed that the leap_armed status was not set.

mike@bb2:~$ ntpq -c rv
associd=0 status=0615 leap_none, sync_ntp, 1 event, clock_sync,
version="ntpd 4.2.8p3-RC1@1.3265-o Sat Jun  6 14:56:55 UTC 2015 (1)",
processor="armv7l", system="Linux/3.8.13-bone47", leap=00, stratum=2,

I then restarted ntpd to check if that helped.

Jun  7 08:19:21 bb2 ntpd[19014]: ntpd 4.2.8p3-RC1@1.3265-o Sat Jun  6 14:56:55 
UTC 2015 (1): Starting
Jun  7 08:19:21 bb2 ntpd[19014]: Command line: /usr/local/sbin/ntpd -p 
/var/run/ntpd.pid
Jun  7 08:19:21 bb2 ntpd[19009]: Starting NTP server: ntpd.
..
Jun  7 08:19:21 bb2 ntpd[19015]: leapsecond file ('/etc/ntp/leapdir/leapsecs'): 
good hash signature
Jun  7 08:19:21 bb2 ntpd[19015]: leapsecond file ('/etc/ntp/leapdir/leapsecs'): 
loaded, expire=2015-12-01T00:00Z last=2015-07-01T00:00Z ofs=36
..
mike@bb2:~$ ntpq -c rv
associd=0 status=0619 leap_none, sync_ntp, 1 event, leap_armed,
version="ntpd 4.2.8p3-RC1@1.3265-o Sat Jun  6 14:56:55 UTC 2015 (1)",

So, it’s fixed by a reboot. Anyone seen this?
Mike, even after restart I see the 'leap_armed' event only for a short time -- it gets overwritten with a clock_sync soon. (At least as far as the output of ntpq goes.) Could you check the event log of NTPD for a 'leap_armed' event?

I checked the implementation, and I don't see how the leap_arm event should not happen. I'll need some instrumentation in the code to validate this, and testing will take some time. If you find in the meantime that the event is written to the log, drop me a notice, please.

Cheers,
    Pearly


_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to