[Networkmanager] NetworkManager handling of NTP options

mh at mike.franken.de mh at mike.franken.de
Sat Mar 11 10:29:54 UTC 2023


On Samstag, 11. März 2023 07:25:12 CET Andrei Borzenkov wrote:
> On 10.03.2023 23:50, mh at mike.franken.de wrote:
[...]
> > Whats more: If this static entry exists, NetworkManager is writing it to
> > the above mentioned files even if it gets ntp servers from a DHCP
> > connection. Is this correct?
> 
> Yes. Default netconfig policy if NetworkManager is present is to use
> values from NetworkManager if available and statically defined values
> otherwise. See "man 8 netconfig". NetworkManager does not provide any
> NTP server to netconfig (it only uses it to manage DNS configuration),
> so netconfig falls back to statically defined values. It happens every
> time interface configuration changed.

nm on definitely writes these files on my system as seen below:

NetworkManager[18524]: debug: ntp-runtime Module called
NetworkManager[18524]: debug: Resolved ntp-policy 'auto' for service 
'NetworkManager' to 'ST
ATIC_FALLBACK NetworkManager'
NetworkManager[18524]: debug: Static Fallback
NetworkManager[18524]: debug: Use NetworkManager policy merged settings
NetworkManager[18524]: debug: exec get_ntp_settings: /run/netconfig/
NetworkManager.netconfig
NetworkManager[18524]: debug:      get_ntp_settings: NTP_SERVER_LIST=''
NetworkManager[18524]: debug: exit get_ntp_settings: /run/netconfig/
NetworkManager.netconfig
NetworkManager[18524]: debug: write_chrony_servers: 192.168.1.1
NetworkManager[18524]: debug: ntp servers written to /run/netconfig/
chrony.servers
NetworkManager[18524]: debug: write_ntpd_servers: 192.168.1.1
NetworkManager[18524]: debug: ntp servers written to /run/ntp/servers-
netconfig

If /etc/sysconfig/network/config contains a value for NTP_SERVER_LIST, this 
values gets written to /run/netconfig/chrony.servers and to /run/ntp/servers-
netconfig. I checked both files afterwards and the value is there.
But ...

> > 
> > 
> > 
> > - openSUSE Tumbleweed 20230308
> 
> As was already mentioned, netconfig is completely unrelated to
> NetworkManager, it is external tool to merge dynamic information from
> various sources (mostly intended for DHCP information from different
> interfaces) available in (open)SUSE.

Yes, I know, but ...

> 
> It does not support systemd-timesyncd, although it is possible to add
> netconfig module to do it (modules are located in
> /usr/libexec/netconfig/netconfig.d) in which case you could simply call
> "netconfig" from your dispatch script to update configuration and
> netconfig would Do The Right Thing depending on whether your interface
> has dynamic NTP servers or not. You may also consider extending existing
> /usr/libexec/netconfig/netconfig.d/ntp-runtime to also support
> systemd-timesyncd.

... this is what seems to happen here.
There is a module named ntp-runtime, that belongs to the sysconfig-netconfig 
package - "ntp-runtime Module called". The module seems to be openSUSE special 
- written by suse.de developers.

[...]

Thx and bye.
Michael.




More information about the Networkmanager mailing list