sourcedir reload ignores the maxsources option

Vincent Blut <[email protected]> Sat, 31 May 2025 19:00:12 +0200
Newsgroups gmane.comp.time.chrony.user
Message-ID <aDs1nHU9OMPxVyQV@lamella>
Hi,

chrony 4.6 introduced quite a few changes to the way time sources are
loaded from sourcedir. It seems, though, that we now have a regression¹
as the 'maxsources' option is now ignored when reloading sources.

$ head debian-pool.sources
pool 1.debian.pool.ntp.org maxsources 3

$ chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^+ serveur-sauvegarde.easys>     3   6   377     1   -516us[ -516us] +/-   60ms
^+ ip212-227-232-161.pbiaas>     2   6   377     1  -3531us[-3531us] +/-   58ms
^* flightplandatabase.com        2   6   177     1  +2580us[+2744us] +/-   51ms

$ sudo chronyc reload sources
200 OK

$ chronyc sources
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^+ serveur-sauvegarde.easys>     2   6   377    65  -4089us[-3453us] +/-   57ms
^+ ip212-227-232-161.pbiaas>     2   7   377    67  +1015us[+3415us] +/-   63ms
^+ flightplandatabase.com        2   6   377     1  +2416us[+2416us] +/-   44ms
^+ rap.cyberbits.eu              2   6    37     5   +157us[ +157us] +/-   56ms
^+ 82-65-248-56.subs.proxad>     1   6    37     6  +3329us[+3963us] +/-   29ms
^* dedibox.demongeot.biz         2   6    37     5  -1047us[ -414us] +/-   20ms

Reloading sources again would add more selectable sources.

Cheers,
Vincent

P.S. Don't mind the bad numbers, I'm running these commands in a VM on a slow network.

¹ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106875
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSRJQjHKbAUfuoc+DAQn1qAt/bgAQUCaDs1nAAKCRAQn1qAt/bg
AceoAQCpA4SIO891b1e00wAkt00PggrgkNL6Q2cO/qnCeyry5wEA5WqS7mDrRGIa
NuYOHpD6/MoYW5hx9Mdqe6Y6EAMB4ww=
=OjfG
-----END PGP SIGNATURE-----