Upon service startup, the NTPd will refuse to accept time from its time sources (servers) if configured with "restrict default ignore". Users cannot alter this default by CLI. As shown below, this is hardcoded in the config generator script:
/usr/libexec/vyos/conf_mode/ntp.py: 34 # 35 # Non-configurable defaults 36 # 37 driftfile /var/lib/ntp/ntp.drift 38 # By default, only allow ntpd to query time sources, ignore any incoming requests 39 restrict default ignore 40 # Local users have unrestricted access, allowing reconfiguration via ntpdc 41 restrict 127.0.0.1 42 restrict -6 ::1
By configuring "restrict default noquery nopeer notrap nomodify", NTPd will start just fine and be available for downstream time sync within a few seconds.
To fix this, I propose to either alter line 39 in /usr/libexec/vyos/conf_mode/ntp.py from "restrict default ignore" to "restrict default noquery nopeer notrap nomodify" (works, tested) or allow this value to be user-configurable.
Best greetings!
Al
PS: VyOS version information:
Version: VyOS 1.2.0-rolling+201808072059 Built by: alainlamar Built on: Tue 07 Aug 2018 20:59 UTC Build ID: a8991cc6-24a5-4b63-ba9f-20d394c9743c Architecture: x86_64 Boot via: installed image System type: bare metal Hardware vendor: PC Engines Hardware model: apu2 Hardware S/N: Unknown Hardware UUID: Unknown Copyright: VyOS maintainers and contributors