#731352 ntpdate-debian ignores DHCP ntp-servers option by default

#731352#5
Date:
2013-12-04 14:13:08 UTC
From:
To:
Downstream bug: https://bugs.launchpad.net/maas/+bug/1257082

It's not clear if this is a bug or intended behaviour. I'd appreciate
your consideration.

We are using machines which don't have persistent RTCs, and so want to
use the DHCP-supplied NTP server on boot to set the clock correctly.

Doing this with ntpdate through /etc/dhcp/dhclient-exit-hooks.d/ntpdate
seems appropriate.

Most of the code needed already exists, and it seems to me that the
intention is that the ntpdate package will arrange this automatically
and by default.

However, the logic in /usr/sbin/ntpdate-debian does not use or examine
/var/lib/ntpdate/default.dhcp if NTPDATE_USE_NTP_CONF is set to yes,
which is the default, even when the ntp package is not installed and
/etc/ntp.conf does not exist.

It seems to me that the setting of NTPDATE_USE_NTP_CONF=yes is
nonsensical if there is no /etc/ntp.conf, and so should be treated as if
it says "no" in this case.

Alternatively, should /var/lib/ntpdate/default.dhcp be added to the
search list for the NTPDATE_USE_NTP_CONF=yes case, after /etc/ntp.conf?

Thanks,

Robie

#731352#10
Date:
2013-12-12 03:08:11 UTC
From:
To:
I can see how this can seem suboptimal.

Well, it could also be a mistake that /etc/ntp.conf is missing.

That wouldn't really be true to the name "use ntp.conf".  We could
conceivably add a mode that says, use any NTP servers you can find, but
that might be bit too unspecific.

Generally, our idea is that ntpdate is deprecated and shouldn't be used
at all, or certainly not be used without an ntp server installed as
well, so other cases might not be well supported.  I would, however,
consider patches.

#731352#15
Date:
2014-10-13 08:17:09 UTC
From:
To:

#731352#20
Date:
2014-10-13 16:40:10 UTC
From:
To:
That is, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617965