-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zfs-load-key.sh will loop forever if loading module failed #13308
Comments
actually, that's stupid, we're much better off just doing while l="$(zpool list -H)" && [ -z "$l" ]; do which will catch all problems of the sort |
Hm, actually, the while ! systemctl is-active --quiet zfs-import.target; do condition from #13291 is sufficient for this, since it depends on both import services, which are skipped and therefore fulfilled, zfs-env-bootfs which always succeeds, and zfs-load-module which fails, so it's in |
we used to - actually, it needed looking back, the change was introduced here and claimed "things will just work", which is quite interesting now in retrospect. |
I mean, in looking through the journal to debug this I did actually see that udev was loading the module first (and failing for reasons mentioned, which lead to an Thanks for the issue ref – I was actually under the impression that we don't have auto-loading (I only skimmed that file before), but it appears we do, except it's off by default and needs |
yeah kinda hard to get that env var if you don't have an initrd or something, too. by "used to" i mean the binaries used to load the kernel module by exec'ing modprobe from inside the zpool/zfs binaries |
Fixed by #13291 |
System information
Describe the problem you're observing
I upgraded DKMS (and fiddled with the configuration) and to 2.1.4 – this had the unfortunate effect of generating an initrd with unsigned modules, which I neglected to verify. With
module.sig_enforce=1
, this meant thatzfs-load-module.service
failed withThis, then, meant that
spewed
every 0.1s onto the console, because both import services were
inactive
.This was very fun to debug.
Describe how to reproduce the problem
As above.
Ideally, we'd just do
systemctl is-active -q zfs-load-module.service || exit 1
in that loop, but, uh, that's a debian patch (which, funnily enough, we actively sanction since 5eae5a8). So[ -e /sys/module/zfs ] || [ -e /sys/fs/zfs ] || exit 1
, then. This will ensure we fail gracefully.But rather than do that, why aren't we.. just loading the module from userspace? We do it in
systemd/zram-generator
and it's fine (hell, expected, even! it was quite shit before we started to). We do it on FreeBSD and it's fine. Honestly, not loading it is kinda weird.The text was updated successfully, but these errors were encountered: