zfs-mount-generator improvements (remove udev-settle dependency) RFC#18486
zfs-mount-generator improvements (remove udev-settle dependency) RFC#18486aerusso wants to merge 2 commits into
Conversation
Previously, the zfs-mount-generator produced .mount units that depended on the zfs-import.target. This meant that every filesystem required all pool imports be completed before beginning mounting. Additionally, the zfs-import*.service units that actually performed the `zpool import` depended on the deprecated systemd-udev-settle.service. This leads to warnings, and more fragile mount behavior. Instead, make the zfs-mount-generator .mount units depend on a per-pool zfs-import@.service template. Additionally, have zfs-mount-generator grant zfs-import@.service dependencies on the associated `.device`s required for the pool to actually import. Signed-off-by: Antonio Enrico Russo <aerusso@aerusso.net>
Remove udev settle dependencies in systemd units that depend on zfs-import targets. Also, remove the zfs-import.target wait for zfs-mount@.service, since not all pools need to be imported to begin mounting filesystems. Signed-off-by: Antonio Enrico Russo <aerusso@aerusso.net>
|
Yikes, the OOM logic is nasty (and there are memory leaks). I need to work through that before this is worth a close review. The other logic is still worth looking at, though. |
|
Thanks @aerusso for tackling this work. I think this makes a lot of sense and is the way we need to go, just a couple questions.
Could you elaborate a bit on how systemd handles this when there are multiple devices listed. When is the But what happens if one of the expected |
Motivation and Context
Previously, the zfs-mount-generator produced .mount units that depended on the zfs-import.target. This meant that every filesystem required all pool imports be completed before beginning mounting. Additionally, the
zfs-import*.serviceunits that actually performed thezpool importdepended on the deprecated systemd-udev-settle.service. This leads to warnings, and more fragile mount behavior.See also #10891
Description
Instead, make the zfs-mount-generator
.mountunits depend on a per-poolzfs-import@.servicetemplate. Additionally, have zfs-mount-generator grantzfs-import@.servicedependencies on the associated.devices required for the pool to actually import.Additionally, remove udev settle dependencies in systemd units that depend on zfs-import targets. Also, remove the zfs-import.target wait for
zfs-mount@.service, since not all pools need to be imported to begin mounting filesystems.How Has This Been Tested?
I am running this, rebased onto 2.4.1. I am looking for more widespread testing here.
I suspect that this may break some configurations. We need to talk about this.
Types of changes
Checklist:
Signed-off-by.