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
nixos/zfs: Fix boot.zfs.forceImportAll #95751
Conversation
/marvin opt-in |
Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here. |
Might I suggest changing the default to false seeing as users of zfs might be used to current behavior? |
@asdf8dfafjk Looks like it's enabled by default for backwards compatibility reasons? Shouldn't be a huge deal, I don't think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a pretty simple change. I think this more closely matches intended behavior, so +1 to this.
You guys are much more experienced but the "new backward compatibility" is that by default non-root pools are not forcefully imported. I'll defer to you guys anyway. |
@asdf8dfafjk I agree with you. It used to be false, and now it would be true. I will fix this once I'm back from vacation. It should continue being false. |
I'm good with it either way. |
do you mind writing in the 2103 release notes that this is a potential breaking change for some users https://github.com/NixOS/nixpkgs/blob/master/nixos/doc/manual/release-notes/rl-2103.xml |
f04e566
to
d05f2a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Also off-topic, but: can I just say that I love to read our new Python-based tests? 😸
/status needs_merger
previously did nothing, but has been fixed. However its default has been | ||
changed to <literal>false</literal> to preserve the existing default | ||
behaviour. If you have this explicitly set to <literal>true</literal>, | ||
please note that your non-root pools will now be force imported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"forcibly imported" might sound a little bit better, but the documentation itself is clear enough and understandable. I had to read a little bit of ZFS documentation to understand why this might even be needed and what safeguards are bypassed by this option, but, well, we all learn something new every day, don't we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this. I'll merge once this is updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I've changed the wording. I understand the concern wrt. having to read ZFS documentation, but I'm a bit wary of including too much here, so I didn't make any other changes for now. :)
According to the docs of boot.zfs.forceImportAll this option makes it so that non-root pools are forcibly imported. As far as I can figure out, and as the test included in this PR demonstrates, it actually does nothing 🥽
Fix it so that the zpool pool import service forcibly imports if the option is
true
(the default.)cc @adisbladis maybe? 🙂
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)