ntp: use per-server chrony settings - #4923
Draft
xiaotianlyu wants to merge 2 commits into
Draft
Conversation
Move the default time servers to the named per-server format so each source can carry its own directive and options. Configure chrony log categories through the new ntp.logging setting. Signed-off-by: Melody Lyu <tianlyu@amazon.com>
Convert the legacy server list to named per-server settings on upgrade. Restore an old-readable list on rollback. Register the migration for the 1.64.0 to 1.65.0 transition and keep release versions aligned. Signed-off-by: Melody Lyu <tianlyu@amazon.com>
xiaotianlyu
force-pushed
the
ntp-per-server-config
branch
from
September 2, 2026 03:37
d2acce8 to
97ae203
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes:
Updates the shared NTP defaults to use named per-server chrony settings:
169.254.169.123as a preferredserverpolled every 16 seconds;2.amazon.pool.ntp.orgwith thetime.aws.compool;Adds a datastore migration for existing nodes. On upgrade, it converts the old
settings.ntp.time-serverslist and shared options into named servers. On rollback, it converts named servers back into a list and shared options that the old API can read.The migration is required because Storewolf otherwise retains the old list while adding the new named keys. This was reproduced during upgrade as:
The migration is registered for the
1.64.0 -> 1.65.0transition.Testing done:
Local tests:
cargo test -p ntp-time-servers: 6 passedcargo test -p migration-helpers: 19 passedcargo clippy -p ntp-time-servers --all-targets -- -D warnings: passedcargo fmt --manifest-path sources/Cargo.toml --all -- --check: passedgit diff --check: passedFilesystem migration test:
Full image upgrade and rollback test:
aws-k8s-1.32x86_641.65.0test image containing all three related changes;migrate_v1.65.0_ntp-time-servers.lz4;1.64.0node with the old server list;1.64.0to the test1.65.0image;1.64.0.After upgrade:
the migrator journal reported that the NTP migration completed successfully;
apiclient get settings.ntpreturned only the namedlink-localandamazon-poolentries, with no duplicate-field error;/etc/chrony.confrendered:changing logging to ["tracking"] rendered log tracking;
changing logging to [] removed the log directive;
chronyd was active with NRestarts=0;
all three log files were written under /var/log/chrony with the expected
owner and measure_t SELinux label.
After rollback:
1.64.0;169.254.169.123andtime.aws.comin the restored list;iburstoption.Related PRs:
This PR depends on releases containing the settings-sdk and core-kit changes above.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.