Skip to content

Default to chrony for time sync, disable systemd-timesyncd#28

Merged
passcod merged 3 commits into
mainfrom
chrony-time-sync
May 6, 2026
Merged

Default to chrony for time sync, disable systemd-timesyncd#28
passcod merged 3 commits into
mainfrom
chrony-time-sync

Conversation

@passcod
Copy link
Copy Markdown
Member

@passcod passcod commented Apr 25, 2026

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-timesyncd is only a Recommends of systemd-sysv on 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: new r[image.packages.chrony] requirement — chrony must be installed and enabled, no other time-sync daemon may be active.
  • image/packages.sh: chrony added to the package list.
  • image/configure.sh: after the package install, if a systemd-timesyncd binary or unit file is present, explicitly systemctl disable && systemctl mask it so chrony wins. In practice this block is a no-op given current packaging — purely defensive.
  • tests/test-image-structure.sh: verifies chrony.service is enabled, /usr/sbin/chronyd exists, and no systemd-timesyncd enable-symlinks are present.

@passcod passcod force-pushed the chrony-time-sync branch 2 times, most recently from 1c7d261 to 29629b0 Compare May 6, 2026 07:40
@passcod passcod changed the base branch from main to housekeeping May 6, 2026 07:40
@passcod passcod force-pushed the chrony-time-sync branch from 29629b0 to ab76a8f Compare May 6, 2026 07:48
@passcod passcod force-pushed the chrony-time-sync branch from ab76a8f to fe92e76 Compare May 6, 2026 08:36
Base automatically changed from housekeeping to main May 6, 2026 09:21
passcod added 3 commits May 6, 2026 21:22
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.
@passcod passcod force-pushed the chrony-time-sync branch from fe92e76 to e7df674 Compare May 6, 2026 09:22
@passcod passcod marked this pull request as ready for review May 6, 2026 09:22
@passcod passcod merged commit 7844ed0 into main May 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant