Subject: Re: ntpd
To: None <current-users@netbsd.org>
From: Miles Nordin <carton@Ivy.NET>
List: current-users
Date: 10/12/2005 17:19:51
--pgp-sign-Multipart_Wed_Oct_12_17:19:40_2005-1
Content-Type: text/plain; charset=US-ASCII

>>>>> "mn" == Miles Nordin <carton@Ivy.NET> writes:

    mn> so, that feature is not working.  I checked FreeBSD, which is
    mn> also ntp 4.20, and it's broken over there, too.

I checked a NetBSD 1.6.1_STABLE machine, which is ntpd 4.0.99i.  The
deferred name lookup feature _does_ work over there.

I thought DNS was broken on that machine altogether, which was what I
was vaguely remembering, but it turned out the real cause was:

restrict default nomodify

in /etc/ntp.conf which did indeed made 'server <hostname>' not work at
all.  I added 'restrict 127.0.0.1 #empty restrictions' and both
nameservice and deferred nameservice retrying started working again on
NetBSD 1.6.  Adding the same line to NetBSD 3.0 doesn't help---you
only get one shot at nameservice, at startup.

I noticed some other regressions between 4.0.99i and 4.20.  Here's the
full list:

 * ntpd_initres mechanism to keep trying failed DNS lookups broke

 * ntpq does not do reverse lookup for the 'refid' field at all.
   There was some changelog to stop lookup for fake refclock
   127.127.x.x addresses, but it's not reverse-looking-up any
   addresses.

 * 'ntptime' no longer reports when ntp isn't working.  For example,
   when ntpd is not running at all, a NetBSD 1.6 system reports:

-----8<-----
ntp_gettime() returns code 5 (ERROR)
  time c6f7f9fe.f87b7000  Wed, Oct 12 2005 17:09:18.970, (.970634),
  maximum error 108048 us, estimated error 16 us.
ntp_adjtime() returns code 5 (ERROR)
  modes 0x0 (),
  offset -1548.000 us, frequency 74.770 ppm, interval 1 s,
  maximum error 108048 us, estimated error 16 us,
  status 0x41 (PLL,UNSYNC),
  time constant 6, precision 1.000 us, tolerance 512 ppm,
-----8<-----

   while a NetBSD 3.0_BETA system reports:

-----8<-----
ntp_gettime() returns code 0 (OK)
  time c6f7fa2f.1b7f6000  Wed, Oct 12 2005 21:10:07.107, (.107412),
  maximum error 1022840 us, estimated error 16 us
ntp_adjtime() returns code 0 (OK)
  modes 0x0 (),
  offset 0.000 us, frequency -332.393 ppm, interval 1 s,
  maximum error 1022840 us, estimated error 16 us,
  status 0x1 (PLL),
  time constant 0, precision 1.000 us, tolerance 1576 ppm,
-----8<-----

   so the gettime ERROR and the status UNSYNC seem to never be used
   any more.  Also, when ntpd is running, but the clock is off by 8
   seconds, NetBSD 3.0 ntptime(8) also reports OK, while NetBSD 1.6
   reports ERROR in that case.  In general it reports ERROR even after
   ntpd is started, until ntpd declares the clock
   probably-synchronized.

--pgp-sign-Multipart_Wed_Oct_12_17:19:40_2005-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQCVAwUAQ01994nCBbTaW/4dAQL/hwP/Vvr5ySnlpou0PE/E6qo3c/rD+J2XcIch
DGsEimHMReVKCV9RAm18Ujfg0CoRzBrKI4aS7VKmkuaaP4UKniHmrEgs354H6PZN
/EueGKWpXQWwTQuDt0USYzdssPylkoaMlYaLq0a+vlAlRG30EegvayNwHQrThzYA
yS3p0atDXQs=
=s2gK
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_Oct_12_17:19:40_2005-1--