Repository navigation
Conversation
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>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Extension updates can replay stale udev rules, retain the problematic legacy ordering drop-in, and lose removed extensions’ daemon-reload and restart/stop requests.
3 open issues
What changed in this PR
This PR changes ZFS system-extension activation to retrigger udev after merging, replacing the previous approach of delaying udevd.
Changes:
- Backports systemd support for extension-requested unit restarts and reloads.
- Generates restart metadata for extensions containing udev rules and manager-reload metadata for those containing systemd files.
- Removes the ZFS-specific udevd ordering drop-in.
| File | Description |
|---|---|
sdk_container/src/third_party/coreos-overlay/coreos/user-patches/sys-apps/systemd/0009-sysext-Allow-to-re-start-units-from-extension-releas.patch |
Backports extension metadata support for restarting, reloading, and stopping units. |
build_sysext |
Generates conditional manager-reload and udev-trigger metadata. |
build_library/sysext_mangle_flatcar-zfs |
Removes the drop-in ordering udevd after sysext activation. |
Review effort: Balanced
| L /etc/zfs/zfs-functions - - - - /usr/share/zfs/etc/zfs/zfs-functions | ||
| L /etc/zfs/zpool.d - - - - /usr/share/zfs/etc/zfs/zpool.d | ||
| C /etc/systemd/system/systemd-udevd.service.d/10-zfs.conf - - - - /usr/lib/systemd/system/systemd-udevd.service.d/10-zfs.conf | ||
| EOF |
| fi | ||
|
|
||
| if [[ -d ${BUILD_DIR}/${FLAGS_install_root_basename}/usr/lib/udev/rules.d || -d ${BUILD_DIR}/${FLAGS_install_root_basename}/etc/udev/rules.d ]]; then | ||
| echo "EXTENSION_RESTART_UNITS='systemd-udev-trigger.service'" >> "${metadata}" |
Comment on lines
+318
to
+320
| + _cleanup_set_free_ Set *units_to_restart = NULL, *units_to_reload_or_restart = NULL; | ||
| + bool need_to_reload; | ||
| + r = get_extension_release_metadata(image_class, hierarchies, no_reload, &need_to_reload, &units_to_restart, &units_to_reload_or_restart); |
This branch was successfully deployed
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.

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_UNITSfrom systemd 262 to do this.I also made it so that
EXTENSION_RELOAD_MANAGERis only added when the sysext includes systemd units.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/directory (user-facing change, bug fix, security fix, update) -- (it wasn't broken in a release)/bootand/usrsize, packages, list files for any missing binaries, kernel modules, config files, kernel modules, etc.