zpool.present: correctly handle "feature@" properties #62448
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Optional ZFS pool features can have three states: disabled, enabled, and
active. Enabled means that ZFS will use them if it needs them, but they
haven't changed the on-disk format yet, so they can still be switched
off. But active features have already changed the on-disk format, so
they can't be switched off. Disabled features may not be used.
When enabling such a feature via the zpool.present state, treat "active"
as identical to "enabled".
Fixes #62390
What does this PR do?
Treats zpool properties named "feature@XXX" as being "enabled" if they are really "active" during the
zpool.present
state.What issues does this PR fix or reference?
Fixes: 62390
Previous Behavior
If a
zpool.present
state tried to set a feature toenabled
, but that feature was already active on the pool, then Salt would redundantly executezpool set
again, to no effect.New Behavior
Such a state won't result in any action being taken.
Merge requirements satisfied?
Commits signed with GPG?
Yes