Challenges With chrony Additional Parameters


I have installed chrony-nts and ntpdate.

chronyd and chronyc are working. I would say basic configuration is working. I want to extend my chrony configuration beyond basic. I like to see if anyone can offer insight into the beyond configuration options I seem to be having challenge with. I like to tackle these one at time in part in case one answer might cause me to refine my deductions of configuration I was incorrect with.

The first challenge is to configure "maxsources" for a working pool configuration:

config pool
option hostname ''
option maxpoll '9'
option minpoll '7'
option iburst 'yes'
option maxsources '2'

This configuration works, but "maxsources" does not so this results in default four servers being obtained from the pool. I did try with option "maxsources='2'" as well as some examples in my research used "=" and not space. Same result of four default servers was obtained. I knew all options, but the "maxsources" was working when I did a "chronyc sources". I checked via "cat /var/etc/chrony.d/10-uci.conf" to find no "maxsources".

"maxsources" option is unique to the "pool" configuration and not valid for the "server" configuration.

What am I missing or doing incorrectly?


maybe i am wrong but ..
there is no maxsources param handling in init script

handle_source() {
        local cfg=$1 sourcetype=$2 disabled hostname minpoll maxpoll iburst nts
1 Like

If you want to fine tune your configuration, comment out the entire pool section in /etc/config/chrony and use /etc/chrony/chrony.conf instead. This way you should be able to use all valid options.

pool iburst minpoll 7 maxpoll 9 maxsources 2
1 Like

Thanks NPeca75 and pavelgi. Sad that I cannot use '/etc/config/chrony' as that is the file backed up via Backup function via LuCI web interface. The '/etc/chrony/chrony.conf' is not backed up via the backup function via LuCI web interface.

I commented out all of the '/etc/config/chrony' just so have some reference to what used for '/etc/chrony/chrony.conf'. I may delete '/etc/chrony/chrony.conf' and put a commented copy of '/etc/chrony/chrony.conf' just so the configuration an be backed up. This will likely lead me to make an enhancement request for OpenWRT.

As expected 'maxsources' works when placed with pool configuration. I am assuming some of the other options and configuration elements I coded into '/etc/chrony/chrony.conf' likely do not have math in the init script for chrony. I did not have time to work on converting my '/etc/config/chrony' until bit over day after my initial post and it took me almost a day to so convert as well as add some other options of interest and then test.

After two days of testing all seems fine except 'minsources' appears to be ignored. The 'minsources' is not a concern of this topic, just an FYI.

well, quick look at init script reveal that only
1 lines need to be changed
and 2 lines addition
for chronyd to work with maxsources
not a big deal :slight_smile:

i created a PR here so maybe you get lucky :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.