Bugzilla – Bug 1188980
Multiple pool entries in chrony configuration at install
Last modified: 2022-04-19 13:05:50 UTC
A fresh installation of a openSUSE leap (15.3) as a server resulted in chrony tracking 18 time sources
localhost:~ # chronyc sources | head -n 1
210 Number of sources = 18
These are coming from two places - The first (expected) is via the chrony-pool-openSUSE
localhost:~ # cat /etc/chrony.d/pool.conf
pool 2.opensuse.pool.ntp.org iburst
localhost:~ # rpm -qf /etc/chrony.d/pool.conf
however it looks like something at install time alters the standard chrony.conf
localhost:~ # rpm -V chrony
S.5....T. c /etc/chrony.conf
and adds multiple "pool" entries in a manner which looks like something that originally used "server" entries
localhost:~ # grep ^pool /etc/chrony.conf
pool 0.suse.pool.ntp.org iburst
pool 1.suse.pool.ntp.org iburst
pool 2.suse.pool.ntp.org iburst
pool 3.suse.pool.ntp.org iburst
I think this could be related to #1180689 and #1172517 - but I can't work out what takes the server list generated by https://github.com/yast/yast-network/blob/master/src/lib/y2network/ntp_server.rb and adds them to the config.
IMHO, the solution is not to add any pool entries into chrony.conf if already using the include /etc/chrony.d/*.conf method.
If they _do_ need to be added, one pool entry should be enough.
probably filled in by yast2
Yep, looks like related to https://bugzilla.suse.com/show_bug.cgi?id=1180699 and already tracked by https://trello.com/c/HtBLfvR0/4499-3-ostumbleweed-p5-1180699-microos-defaults-to-using-the-suse-ntp-pool which is in the incoming board.
With yast2-network-4.4.23 it will configure only one pool from the default list of sources (https://github.com/yast/yast-country/pull/282).
But that means there will be at least two pools, the YaST one configured in /etc/chrony.conf and the other one provided by the chrony-pool-openSUSE RPM.
The current YaST dialog models ignores anything under /etc/chrony.d so, it does not about the pools configured there and thus, them are not exposed in order to sync the time with the dialog.
So, this looks like an enhancement for changing the current behavior, I will create a separate PBI in order to address it.
I have created a separate PBI in order to address this issue as it needs some discussions / agreements.
Reinhard: We discussed this within a team and basically we have ideas how to fix it, but also we would like to verify it with you as you introduce that branding pools packages.
So installation use-cases:
1. user wants distro defaults. In such case I think it makes sense to ensure that branding pool is installed ( so force install of chrony-pool-nonempty ) and ensure that chrony service is enabled and do nothing beside that.
2. user wants his own ntp server to be used. In such case we should force chrony-pool-empty and write to /etc/chrony.d/pool.conf server user wants to use.
3. user do not want ntp sync - in such case do not install chrony.
And second case is modifications on running system. Reading is easy case as we can read all entries and read pool from it, but big topic is how to handle changes. What do you recommend to do? Remove pool keys from all configs and just use pool.conf? or disable touching of pools outside of pool.conf? And what about old chrony config in chrony.conf when user migrate?
In my opinion /etc/chrony.conf should not contain any pools because we have defined a pool in /etc/chrony.d/pool.conf so this is doubled.
In the default install we have now 4 pools in /etc/chrony.conf and one in /etc/chrony.d/pool.conf each is providing 4 Servers so we have 20 Servers which is way to much and loads ntp.org more then necessary.