-
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
Add compatibility file for GRUB versions up to v2.06 #15909
Conversation
I am not sure this approach is really usable. Without knowing which GRUB versions are affected, it is impossible to safely choose the compatibility profile. And the lack of understanding for the issue makes its further maintenance problematic. Read-only-compatible features should not cause problems to GRUB, so I wonder if it is just a GRUB bug triggered by some of the features, or some feature is not so much compatible as we'd like. |
It was a bug they've fixed, yes, but I don't think we're going to win the argument of making every distro cherrypick grub2 fixes in a timely fashion, compared to people running our newest versions or people packaging newer things than the distro does, and getting burned. I said in another one, I think #15459, that I think we should do the opposite, and make Admittedly, this is biased by me not looking forward to having to explain to a lot of people who will come by asking why |
11ef525
to
2273c2b
Compare
I have updated the PR and added a new compatibility file, The existing grub2 compatibility file lists all read-only features that can be enabled on boot pool for grub with version 2.12 |
2273c2b
to
1040cfb
Compare
I have been working on testing all the zpool features present in While the naming convention of newly added file and whether we should rename this file to The issue is fixed in grub and working around it by dirty-ing the pool status for nearly all zpools using grub2 compatibility does not seem like a good solution to me. |
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib
Show resolved
Hide resolved
1040cfb
to
06ef85f
Compare
06ef85f
to
87791f9
Compare
GRUB is not able to detect ZFS pool if snaphsot of top level boot pool is created. This issue is observed with GRUB versions up to v2.06 if extensible_dataset feature is enabled on ZFS boot pool. compatibility=grub2-2.06 would enable all read-only compatible zpool features except extensible_dataset and other features that depend on it. The existing grub2 compatibility file is now renamed to grub2-2.12 to reflect the appropriate grub2 version. grub2-2.12 lists all read-only features that can be enabled on boot pool for grub2 with version 2.12 onwards. A new symlink grub2 is created that currently points to the grub2-2.12 compatibility file. Signed-off-by: Umer Saleem <[email protected]>
In zpool_create.shlib, check_feature_set iterates over all features mentioned in provided compatibility file to check if only those features are enabled on the pool. This commit fixes skipping over comment lines correctly. Otherwise, the test case fails as comment lines are also treated as feature names by check_feature_set function. Signed-off-by: Umer Saleem <[email protected]>
87791f9
to
45a1d46
Compare
GRUB is not able to detect ZFS pool if snaphsot of top level boot pool is created. This issue is observed with GRUB versions up to v2.06 if extensible_dataset feature is enabled on ZFS boot pool. compatibility=grub2-2.06 would enable all read-only compatible zpool features except extensible_dataset and other features that depend on it. The existing grub2 compatibility file is now renamed to grub2-2.12 to reflect the appropriate grub2 version. grub2-2.12 lists all read-only features that can be enabled on boot pool for grub2 with version 2.12 onwards. A new symlink grub2 is created that currently points to the grub2-2.12 compatibility file. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Umer Saleem <[email protected]> Closes #13873 Closes #15261 Closes #15909
In zpool_create.shlib, check_feature_set iterates over all features mentioned in provided compatibility file to check if only those features are enabled on the pool. This commit fixes skipping over comment lines correctly. Otherwise, the test case fails as comment lines are also treated as feature names by check_feature_set function. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Umer Saleem <[email protected]> Closes openzfs#15909
GRUB is not able to detect ZFS pool if snaphsot of top level boot pool is created. This issue is observed with GRUB versions up to v2.06 if extensible_dataset feature is enabled on ZFS boot pool. compatibility=grub2-2.06 would enable all read-only compatible zpool features except extensible_dataset and other features that depend on it. The existing grub2 compatibility file is now renamed to grub2-2.12 to reflect the appropriate grub2 version. grub2-2.12 lists all read-only features that can be enabled on boot pool for grub2 with version 2.12 onwards. A new symlink grub2 is created that currently points to the grub2-2.12 compatibility file. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Umer Saleem <[email protected]> Closes openzfs#13873 Closes openzfs#15261 Closes openzfs#15909
Motivation and Context
GRUB is not able to detect ZFS pool if snaphsot of top level boot
pool dataset is created. This issue is observed with GRUB versions
up to v2.06 if extensible_dataset feature is enabled on ZFS boot pool.
#15261
#13873
Description
A new compatibility file is added
grub2-2.06
for GRUB versionsupto 2.06.
compatibility=grub2-2.06
would enable all read-onlycompatible zpool features except
extensible_datase
t and otherfeatures that depend on it.
The existing grub2 compatibility file lists all read-only features
that can be enabled on boot pool for grub with version 2.12
onwards. The issue is fixed on GRUB v2.12.
Documented both
grub2
andgrub2-2.06
files in zpool-features.7.livelist
feature also depends onextensible_dataset
, but it wasdocumented. zpool-features.7 is updated for that as well.
How Has This Been Tested?
Tried creating boot pool with
compatibility=grub2-2.06
, aftercreating the snapshot of top level dataset of ZFS boot pool.
Verified
grub-probe
still detects the ZFS pool.Confirmed after re-enabling
extensible_dataset
feature and issueoccurs.
Types of changes
Checklist:
Signed-off-by
.