chronyd: add prefer
and maxsources
options
#25855
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Maintainer: Miroslav Lichvar [email protected] (find it by checking history of the package Makefile)
Compile tested: n/a
Run tested: (arch, model, OpenWrt version) Intel(R) Core(TM) i3-4150T CPU @ 3.00GHz, LENOVO INVALID, OpenWrt 23.05.2 r23630-842932a63d; I have implemented the changes on my machine and tested if chrony config file is generated correctly,
Description:
Added support for specifying two options in sources definitions -
prefer
(applicable for server, pool and peer) andmaxsources
(applicable only for pool).Per chrony docs,
prefer
makes chrony prefer given source over other selectable sources without the prefer option.I find it useful to not use pool.ntp.org if possible (as their website suggests) and to use servers with better stratum when possible.
Per chrony docs,
maxsources
sets the desired number of sources to be used from the pool. chronyd will repeatedly try to resolve the name until it gets this number of sources responding to requests. The default value is 4 and the maximum value is 16.This can be specified to not overuse (or overuse) pools as needed.0