Skip to content
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

Fix Solaris mismatch where snapshot labels cannot be enabled when snapshots are disabled globally #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rzumer
Copy link

@rzumer rzumer commented Mar 19, 2024

To match the Solaris implementation, it should be possible to disable all snapshots via the com.sun:auto-snapshot property, and subsequently override that parameter by explicitly enabling individual labels.

This is achieved when opt_default_exclude is disabled (the default behavior) by adding datasets for which the label is explicitly enabled (com.sun:auto-snapshot:<label>=true) to CANDIDATES regardless of the value of com.sun:auto-snapshot.

That will allow users to ignore all automatic snapshots except for weekly ones via zfs set com.sun:auto-snapshot=false dataset; zfs set com.sun:auto-snapshot:weekly=true dataset, as documented here. Right now weekly will still be skipped in this scenario.

I tested the awk selector to make sure the correct datasets would be returned on my system, but I have a simple hierarchy and configuration, so I may not be aware of implications of this change on more complex hierarchies.

Fixes #127.

To match the Solaris implementation, it should be possible to disable all snapshots via the com.sun:auto-snapshot property, and subsequently override that parameter by explicitly enabling individual labels.

This is achieved when opt_default_exclude is disabled (the default behavior) by adding datasets for which the label is explicitly enabled to CANDIDATES.
@rzumer rzumer changed the title Allow snapshot labels to be whitelisted Fix Solaris mismatch where snapshot labels are disabled with the global parameter Mar 19, 2024
@rzumer rzumer changed the title Fix Solaris mismatch where snapshot labels are disabled with the global parameter Fix Solaris mismatch where snapshot labels cannot be enabled when snapshots are disabled globally Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Isn't opt_default_exclude backwards?
1 participant