Skip to content

Fix zfs sysext by triggering udev when sysext includes udev rules - #4377

Open
chewi wants to merge 5 commits into
mainfrom
chewi/sysext-udev
Open

chewi wants to merge 5 commits into
mainfrom
chewi/sysext-udev

Conversation

@chewi

@chewi chewi commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The zfs sysext tried to delay udevd until after the sysext is merged, but that recently broke. We probably can't order things that way round any more. This change triggers udev when the sysext is merged instead, which is better anyway. I had to backport the EXTENSION_RESTART_UNITS from systemd 262 to do this.

I also made it so that:

  • system-tmpfiles is rerun on merging when the sysext includes config.
  • EXTENSION_RELOAD_MANAGER is only added when the sysext includes systemd units.

See below for a detailed discussion between myself and Copilot on the best approach to take here.

How to use

With a second disk attached, manually add the zfs sysext, reboot, verify that it doesn't hang like before, create the zpool, reboot again, and check that it loaded the zfs kernel module. You can also (un)merge the sysext while checking for activity in systemctl status systemd-udev-trigger.service.

Testing done

I've manually done the above. I'll kick off Jenkins from here.

  • Changelog entries added in the respective changelog/ directory (user-facing change, bug fix, security fix, update) -- (it wasn't broken in a release)
  • Inspected CI output for image differences: /boot and /usr size, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.

@chewi chewi self-assigned this Nov 11, 2026
@chewi
chewi requested a review from a team as a code owner November 11, 2026 16:34
@chewi chewi added the jenkins-ci Perform a CI build using Jenkins rather than GitHub Actions label Nov 11, 2026
Copilot AI balanced review requested due to automatic review settings November 11, 2026 16:34
@chewi
chewi deployed to development November 11, 2026 16:34 — with GitHub Actions Active

This comment was marked as resolved.

@chewi
chewi force-pushed the chewi/sysext-udev branch from 43cfeab to 9f16b86 Compare November 12, 2026 14:16
Copilot AI balanced review requested due to automatic review settings November 12, 2026 14:16

This comment was marked as resolved.

@chewi
chewi force-pushed the chewi/sysext-udev branch from 9f16b86 to 46b1b95 Compare November 12, 2026 14:28
Copilot AI balanced review requested due to automatic review settings November 12, 2026 14:28
@chewi
chewi deployed to development November 12, 2026 14:28 — with GitHub Actions Active

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The boot-time systemd-sysext.service merge needs validation beyond bootengine’s --root merge, but missing upstream unit definitions leave the interaction between the tmpfiles helper’s default dependencies and the backport’s synchronous job wait unresolved.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

pothos and others added 5 commits November 13, 2026 11:27
So far we did not correctly label /usr because it broke certain things
like Docker. With the sysext Docker and new policies we should try
again.
First generate the policy before branching off the base squashfs (which
already misses a lot of things because they the most postprocessing is
done late in finish_image!). Then label /usr and also the sysext
contents in their folder - not in the overlay mount because this would
operate on the whole image.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
We need this to fix the zfs sysext.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
No need to prod it if the sysext doesn't include any systemd units.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This fixes the zfs sysext, which tried to delay udevd until after the
sysext is merged, but that recently broke. We probably can't order
things that way round any more.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
A new systemd unit is needed for this because the one that systemd ships
is only suitable for use at boot time.

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
@chewi
chewi force-pushed the chewi/sysext-udev branch from 46b1b95 to 40a9b99 Compare November 13, 2026 11:31
Copilot AI balanced review requested due to automatic review settings November 13, 2026 11:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Enabling full-root SELinux labeling and moving policy compilation earlier require human runtime validation of enforcing-mode boot and container compatibility, which the reported ZFS checks do not establish.

No open issues 🎉

Review effort: Balanced

This branch is waiting to be deployed

1 waiting deployment
development — 40a9b999 Waiting Nov 13, 2026 by chewi via Wait for approval #6144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jenkins-ci Perform a CI build using Jenkins rather than GitHub Actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants