Default to chrony for time sync, disable systemd-timesyncd#28
Merged
Conversation
8 tasks
fef6a8e to
b0a3226
Compare
1c7d261 to
29629b0
Compare
systemd-timesyncd is only a Recommends of systemd-sysv on every supported suite, and our minbase build uses --no-install-recommends — so without this requirement the image ships with no time-sync daemon at all. Lock chrony in as the daemon, and require that no other time-sync daemon (notably systemd-timesyncd) is active.
Adds chrony to the package list (always installed) and masks systemd-timesyncd post-install if it is present, so chrony is the unambiguous time daemon. systemd-timesyncd's service file declares a runtime Conflicts= against chrony.service, so leaving both enabled and running would mean one fails to start at boot — disabling and masking deterministically prevents that. In practice, --no-install-recommends keeps systemd-timesyncd out of the image on every suite, so the mask block is defensive: it runs only if a future package change pulls timesyncd in.
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.
Summary
Switches the images to chrony as the system time-sync daemon. This came out of a check during 26.04 enablement work (#26 stacks on top of this): no time-sync daemon was making it into the image at all.
systemd-timesyncdis only a Recommends ofsystemd-sysvon every supported suite, and our minbase build uses--no-install-recommends, so neither timesyncd nor any other time-sync daemon was ending up in the image. Add chrony explicitly. Defensively mask systemd-timesyncd in case a future package change pulls it in.What changed
docs/spec/disk-images.md: newr[image.packages.chrony]requirement — chrony must be installed and enabled, no other time-sync daemon may be active.image/packages.sh:chronyadded to the package list.image/configure.sh: after the package install, if asystemd-timesyncdbinary or unit file is present, explicitlysystemctl disable && systemctl maskit so chrony wins. In practice this block is a no-op given current packaging — purely defensive.tests/test-image-structure.sh: verifieschrony.serviceis enabled,/usr/sbin/chronydexists, and nosystemd-timesyncdenable-symlinks are present.