Open gtmills opened 6 years ago
systemd does have different settings for NTP servers, see systemd-timesyncd.service
The NTP servers contacted are determined from the global settings in timesyncd.conf(5), the per-link static settings in .network files, and the per-link dynamic settings received over DHCP. See systemd.network(5) for more details.
timeX.google.com
In current OpenBMC, the related NTP settings are:
NTPServers
property in EthernetInterface.interfaceTimeSyncMethod
in Synchronization.interface
This setting is kind of a global switch to tell systemd to enable or disable systemd-timesyncd
.If the user is an experienced engineer who is familiar with systemd settings, he is fine to know to set different NTP settings for different network interfaces. But if the user is not familiar with this and just wants a global NTP setting, then yes OpenBMC could add this feature as well.
I suggest to discuss this in mailing list to see if it is a wanted feature or not.
Absolutely. User-defined NTP servers should be global (rather than per-interface), and override anything that comes via DHCP.
Then this new feature should be moved to phosphor-settingsd
, which handles such settings and save to config files.
The NTP server acts like a global setting even though it is a network interface (e.g.
eth0
) specific path (e.g./xyz/openbmc_project/network/eth0/attr/NTPServers
).I set the NTPServers property on a network interface that did not have access to the network. The BMC was still able to talk to the NTP server and get the time. After talking with Ratan this is due to systemd-networkd and how it handles NTP servers.
If the NTPServers property acts like a global setting, why not make the path non-network interface specific (
/xyz/openbmc_project/time/attr/NTPServers
maybe?)I am struggling from the GUI to get and set the NTP Servers.. eth0 might not be there and having the user select a network interface from a list lowers usability and which network interface is selected does not matter.
Redfish has a global NTP Server property and I think we should too. Andrew Geissler [10:31 AM] It does seem like the NTP server go under the Manager instance in Redfish, so it’s global. Here’s some doc from the supermicro doc on setting it for their systems.
3.6.6 NTP It is implemented under redfish/v1/Managers/1/NTP Method supported: Get/Patch Patch: "NTPEnable", "PrimaryNTPServer", "SecondaryNTPServer", "DaylightSavingTime"
Andrew Geissler [9:24 AM] From https://www.freedesktop.org/software/systemd/man/timesyncd.conf.html - there’s a reference to “systemd-timesyncd will contact all configured system or per-interface servers”. Implies there’s a way to have a system NTP server setting.