-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Improvements to the 'compatibility' property. #11861
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
Conversation
Some examples:
|
A few comments:
I played around with various combinations of silence, warning and error for each of these situations; the above is my best guess as to the best balance of usability and safety. Let me know what you think. |
Little bit more on my thinking around errors vs warnings: I think we should throw an error when the user does something:
while actions which are easily reversible should only show warnings, even if contrary to the user's apparent intent. So the following actions will show errors:
And the following actions will show only warnings:
|
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 for following up with these improvements. I agree, what you're proposing here strikes me a pretty good balance between between usability and safety. When testing this locally everything worked well and the behavior was in line with what I would expect as a normal user.
This looks good to me. While this does contain an small ABI change I think we can still reasonably get this in for the next release candidate. Thanks!
Cool. Let me know if you need a rebase against head before merging. |
@colmbuckley thanks, yes would you mind rebasing this. We had another small ABI change to libzfs which caused a conflict. |
Several improvements to the operation of the 'compatibility' property: 1) Improved handling of unrecognized features: Change the way unrecognized features in compatibility files are handled. * invalid features in files under /usr/share/zfs/compatibility.d only get a warning (as these may refer to future features not yet in the library), * invalid features in files under /etc/zfs/compatibility.d get an error (as these are presumed to refer to the current system). 2) Improved error reporting from zpool_load_compat. Note: slight ABI change to zpool_load_compat for better error reporting. 3) compatibility=legacy inhibits all 'zpool upgrade' operations. 4) Detect when features are enabled outside current compatibility set * zpool set compatibility=foo <-- print a warning * zpool set feature@xxx=enabled <-- error * zpool status <-- indicate this state Signed-off-by: Colm Buckley <[email protected]>
Done. |
Several improvements to the operation of the 'compatibility' property: 1) Improved handling of unrecognized features: Change the way unrecognized features in compatibility files are handled. * invalid features in files under /usr/share/zfs/compatibility.d only get a warning (as these may refer to future features not yet in the library), * invalid features in files under /etc/zfs/compatibility.d get an error (as these are presumed to refer to the current system). 2) Improved error reporting from zpool_load_compat. Note: slight ABI change to zpool_load_compat for better error reporting. 3) compatibility=legacy inhibits all 'zpool upgrade' operations. 4) Detect when features are enabled outside current compatibility set * zpool set compatibility=foo <-- print a warning * zpool set feature@xxx=enabled <-- error * zpool status <-- indicate this state Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Colm Buckley <[email protected]> Closes openzfs#11861
Several improvements to the operation of the 'compatibility' property: 1) Improved handling of unrecognized features: Change the way unrecognized features in compatibility files are handled. * invalid features in files under /usr/share/zfs/compatibility.d only get a warning (as these may refer to future features not yet in the library), * invalid features in files under /etc/zfs/compatibility.d get an error (as these are presumed to refer to the current system). 2) Improved error reporting from zpool_load_compat. Note: slight ABI change to zpool_load_compat for better error reporting. 3) compatibility=legacy inhibits all 'zpool upgrade' operations. 4) Detect when features are enabled outside current compatibility set * zpool set compatibility=foo <-- print a warning * zpool set feature@xxx=enabled <-- error * zpool status <-- indicate this state Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Colm Buckley <[email protected]> Closes openzfs#11861
Several improvements to the operation of the 'compatibility' property: 1) Improved handling of unrecognized features: Change the way unrecognized features in compatibility files are handled. * invalid features in files under /usr/share/zfs/compatibility.d only get a warning (as these may refer to future features not yet in the library), * invalid features in files under /etc/zfs/compatibility.d get an error (as these are presumed to refer to the current system). 2) Improved error reporting from zpool_load_compat. Note: slight ABI change to zpool_load_compat for better error reporting. 3) compatibility=legacy inhibits all 'zpool upgrade' operations. 4) Detect when features are enabled outside current compatibility set * zpool set compatibility=foo <-- print a warning * zpool set feature@xxx=enabled <-- error * zpool status <-- indicate this state Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Colm Buckley <[email protected]> Closes openzfs#11861
These have been added in 2.1.0 in openzfs/zfs#11468 and refined in openzfs/zfs#11861.
Several improvements to the operation of the 'compatibility' property:
Change the way unrecognized features in compatibility files are handled.
only get a warning (as these may refer to future features not yet in
the library),
get an error (as these are presumed to refer to the current system).
Improved error reporting from zpool_load_compat.
Note: slight ABI change to zpool_load_compat for better error reporting.
compatibility=legacy inhibits all 'zpool upgrade' operations.
Detect when features are enabled outside current compatibility set
Signed-off-by: Colm Buckley [email protected]
Motivation and Context
Description
How Has This Been Tested?
Types of changes
Checklist:
Signed-off-by
.