coreos/fedora-coreos-config

Add support for NTP from DHCP

rtsisyk opened this issue · 2 comments

Chrony ignores NTP server from DHCP. I see that some script exists for AWS and other cloud providers, but it definetly doesn't work with old-school DHCP OPTION 42.

Here is my dnsmasq template:

dhcp-option=42,{{ ntpserver }}

Current workaround is to override *.fedora.pool.ntp.org zone in DNS:

{% for ntpserver in ntpservers %}
address=/.fedora.pool.ntp.org/{{ ntpserver }}
{% endfor %}

BTW, may be it is worth to consider to replace chrony with systemd-timesyncd...

@rtsisyk Thanks for reporting this issue. Could you please provide the FCOS build detail where you're seeing this issue?
We've recently patched FCOS with this temp fix to allow chrony use NTP settings from DHCP (there's also an upstream patch which will be available in Fedora-33 stream releases) and there's a corresponding test as well to verify the change(https://github.com/coreos/fedora-coreos-config/blob/testing-devel/tests/kola/chrony/dhcp-propagation).
Could you pick this stable release: 32.20200824.3.0 and see if you're still hitting this issue?

I'm still on 32.20200629.3.0 release. I will try to upgrade to the latest stable version and re-test that NTP settings works from DHCP. Closing this ticket for now. Thanks!