If NTP is configured using DHCP option 42 time sync is not happening on Ubuntu 22.04 OVAs whereas the same works fine in Ubuntu 20.04 OVAs
For time synchronization when we use DHCP with option 42 in Ubuntu 22.04 chrony is not taking it as the source instead its trying to sync with Cannonical default NTP servers which will not work in Airgapped
In Ubuntu 20.04 tkr version 1.26.x
chronyc is taking the DHCP option 42 for NTP
/var/log/syslog
Feb 5 04:26:20 testcluster-controlplane-px8df-fjt29 chronyd[771]: Selected source 10.x.x.x
Feb 5 04:26:20 testcluster-controlplane-px8df-fjt29 chronyd[771]: System clock wrong by 93.302195 seconds, adjustment started
Feb 5 04:26:20 testcluster-controlplane-px8df-fjt29 chronyd[771]: System clock was stepped by 93.302195 seconds
journal logs
Feb 05 04:24:47 testcluster-controlplane-px8df-fjt29 chronyd[771]: Selected source 10.x.x.x
Feb 05 04:24:47 testcluster-controlplane-px8df-fjt29 chronyd[771]: System clock wrong by 93.302195 seconds, adjustment started
Feb 05 04:26:20 testcluster-controlplane-px8df-fjt29 chronyd[771]: System clock was stepped by 93.302195 seconds
chronyc tracking
Reference ID : 0A0AF733 (10.x.x.x)
Stratum : 3
Ref time (UTC) : Wed Feb 05 05:07:19 2025
System time : 0.000100668 seconds slow of NTP time
Last offset : -0.000082210 seconds
RMS offset : 0.000062809 seconds
Frequency : 10.766 ppm slow
Residual freq : -0.011 ppm
Skew : 0.311 ppm
Root delay : 0.030034067 seconds
Root dispersion : 0.005806204 seconds
Update interval : 257.9 seconds
Leap status : Normal
chronyc sources -v
210 Number of sources = 24
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| / '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? alphyn.canonical.com 0 9 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-5.ntp4.ps5.cano> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-4.ntp1.ps5.cano> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-3.ntp4.ps5.cano> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-4.ntp1.ps5.cano> 0 6 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-3.ntp4.ps5.cano> 0 6 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-5.ntp4.ps5.cano> 0 6 0 - +0ns[ +0ns] +/- 0ns
^* 10.x.x.x 2 8 377 82 -147us[ -230us] +/- 24ms
^? c-75-72-171-171.hsd1.mn.> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? europa.ellipse.net 0 9 0 - +0ns[ +0ns] +/- 0ns
^? mail.aptalaska.net 0 9 0 - +0ns[ +0ns] +/- 0ns
^? ip-64-111-99-224.nodes.d> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? us-west-1.clearnet.pw 0 9 0 - +0ns[ +0ns] +/- 0ns
^? dns-e.ns4v.icu 0 9 0 - +0ns[ +0ns] +/- 0ns
^? 65-100-46-164.dia.static> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? t2.time.bf1.yahoo.com 0 9 0 - +0ns[ +0ns] +/- 0ns
^? pool-173-73-96-68.washdc> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? stl1.us.ntp.li 0 9 0 - +0ns[ +0ns] +/- 0ns
^? s2-b.time.mci1.us.rozint> 0 9 0 - +0ns[ +0ns] +/- 0ns
^? ip229.ip-51-81-226.us 0 9 0 - +0ns[ +0ns] +/- 0ns
^? lithium.constant.com 0 6 0 - +0ns[ +0ns] +/- 0ns
^? 2602:fc2f:100:9800::dead> 0 6 0 - +0ns[ +0ns] +/- 0ns
^? jane.qotw.net 0 6 0 - +0ns[ +0ns] +/- 0ns
^? ntp1.glypnod.com 0 6 0 - +0ns[ +0ns] +/- 0ns
root@testcluster-controlplane-px8df-fjt29:~#
cat /var/lib/dhcp/chrony.servers.eth0
10.x.x.x
In ubuntu 22.04
root@wldnsx-rp7-controlplane-tgcz7-bmkq6:~# chronyc sources -v
.-- Source mode '^' = server, '=' = peer, '#' = local clock.
/ .- Source state '*' = current best, '+' = combined, '-' = not combined,
| / 'x' = may be in error, '~' = too variable, '?' = unusable.
|| .- xxxx [ yyyy ] +/- zzzz
|| Reachability register (octal) -. | xxxx = adjusted offset,
|| Log2(Polling interval) --. | | yyyy = measured offset,
|| \ | | zzzz = estimated error.
|| | | \
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^? prod-ntp-5.ntp4.ps5.cano> 0 14 0 - +0ns[ +0ns] +/- 0ns
^? alphyn.canonical.com 0 14 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-3.ntp4.ps5.cano> 0 14 0 - +0ns[ +0ns] +/- 0ns
^? prod-ntp-4.ntp4.ps5.cano> 0 14 0 - +0ns[ +0ns] +/- 0ns
^? ntp1.kashra-server.com 0 13 0 - +0ns[ +0ns] +/- 0ns
^? web02.versadns.com 0 13 0 - +0ns[ +0ns] +/- 0ns
^? ns2.fortrockdc.com 0 14 0 - +0ns[ +0ns] +/- 0ns
^? arm1.maxhost.io 0 14 0 - +0ns[ +0ns] +/- 0ns
^? ntp.fra1.de.leaseweb.net 0 13 0 - +0ns[ +0ns] +/- 0ns
^? srv2.maxhost.io 0 14 0 - +0ns[ +0ns] +/- 0ns
^? ip212-227-240-160.pbiaas> 0 13 0 - +0ns[ +0ns] +/- 0ns
^? sensei.ruselabs.com 0 13 0 - +0ns[ +0ns] +/- 0ns
root@wldnsx-rp7-controlplane-tgcz7-bmkq6:~# chronyc tracking
Reference ID : 00000000 ()
Stratum : 0
Ref time (UTC) : Thu Jan 01 00:00:00 1970
System time : 0.000000117 seconds slow of NTP time
Last offset : +0.000000000 seconds
RMS offset : 0.000000000 seconds
Frequency : 4.748 ppm slow
Residual freq : +0.000 ppm
Skew : 0.000 ppm
Root delay : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status : Not synchronised
root@wldnsx-rp7-controlplane-tgcz7-bmkq6:~#
cat /var/lib/dhcp/chrony.servers.eth0
10.x.x.x
However there is no entries from chrony log taking the above NTP as the source.
You can check the connectivity to the NTP server using the below command:
chronyd -Q -d 'server x.x.x.x iburst'
This is a BUG with Ubuntu 22.04 OVA and currently there is no permanent fix however you can work around it by configuring NTP server explicitly as mentioned in this doc https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-kubernetes-grid/2-5/tkg/workload-clusters-ytt.html or https://knowledge.broadcom.com/external/article/337407/use-custom-ntp-server-in-tkg.html