Allow pools and servers - #215
Conversation
WalkthroughRefactors chrony setup to remove the Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Config as config.yaml
participant Init as init-chrony/run
participant Chrony as /etc/chrony.conf
Note over Config,Init: Load configuration values
Config->>Init: ntp_pool, ntp_server[], pool_maxsources
Init->>Init: validate (ntp_pool or ntp_server must be non-empty)
alt ntp_pool present
Init->>Chrony: append "pool <ntp_pool> iburst maxsources <pool_maxsources>"
Note right of Init: record pool in serverlist
end
alt ntp_server contains entries
loop for each server
Init->>Chrony: append "server <server> iburst"
Note right of Init: add server to serverlist
end
end
Init->>Chrony: run "initstepslew <serverlist>"
Note over Chrony: Chrony configured and slewed
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Chrony allows both pools and servers to be used simultaneously. For example using a local time server in addition to a public NTP service. * Support both `ntp_pool` and `ntp_server` to be used at the same time. * Add `maxsources` option to pool configuration. Signed-off-by: SuperQ <superq@gmail.com>
|
Technically I think |
|
It's also simply wrong to talk about Chrony working in "modes" because it can be configured with pools, servers, and peers simultaneously. If it needs a breaking change to be correct, I say: break it. |
|
Yup, also was planning on adding refclock to the list. There are some nice Raspbery Pi GPS hats that can be used. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
Just waiting around for review. |
|
Maybe @frenck? |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
Just waiting around for review. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
Just waiting around for review. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
Still waiting for review. |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. Thank you for your contributions. |
|
Still waiting for review. |
Proposed Changes
Chrony allows both pools and servers to be used simultaneously. For example using a local time server in addition to a public NTP service.
ntp_poolandntp_serverto be used at the same time.maxsourcesoption to pool configuration.Related Issues
None
Summary by CodeRabbit
New Features
Documentation
Configuration Changes