You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If com.sun:auto-snapshot is true, with opt_default_exclude enabled, then every label is enabled, even if com.sun:auto-snapshot:label is false.
If com.sun:auto-snapshot is false, with opt_default_exclude disabled, then even if com.sun:auto-snapshot:label is true, it will be disabled.
This contradicts the default behavior on Solaris as documented here (See: "Choose to only take snapshots under a given schedule for a dataset and all direct descendent datasets from the command line").
I'd expect the default behavior with opt_default_exclude disabled to enable a label ifcom.sun:auto-snapshot:label is not falseandcom.sun:auto-snapshot is not falseorcom.sun:auto-snapshot:label is true, even ifcom.sun:auto-snapshot is false. That second case is not handled right now, so if you want snapshots enabled by default, but have a label "whitelist" for a given dataset/pool, you have to explicitly disable every label you use instead of being able to disable snapshots globally and override that setting for some of the labels.
With it enabled it should probably disable every label unless both com.sun:auto-snapshot and com.sun:auto-snapshot:label are true.
The text was updated successfully, but these errors were encountered:
Because of NOAUTO I think the behavior is correct for opt_default_exclude enabled, on second thought.
The default behavior is not exactly backwards but is missing the pattern where snapshots are disabled by default but specific labels are enabled explicitly, #128 should fix that. Hopefully this isn't something that was purposely excluded from this implementation.
zfs-auto-snapshot/src/zfs-auto-snapshot.sh
Lines 460 to 469 in 92db087
If
com.sun:auto-snapshot
istrue
, withopt_default_exclude
enabled, then every label is enabled, even ifcom.sun:auto-snapshot:label
isfalse
.If
com.sun:auto-snapshot
isfalse
, withopt_default_exclude
disabled, then even ifcom.sun:auto-snapshot:label
istrue
, it will be disabled.This contradicts the default behavior on Solaris as documented here (See: "Choose to only take snapshots under a given schedule for a dataset and all direct descendent datasets from the command line").
I'd expect the default behavior with
opt_default_exclude
disabled to enable a label ifcom.sun:auto-snapshot:label
is notfalse
andcom.sun:auto-snapshot
is notfalse
orcom.sun:auto-snapshot:label
istrue
, even ifcom.sun:auto-snapshot
isfalse
. That second case is not handled right now, so if you want snapshots enabled by default, but have a label "whitelist" for a given dataset/pool, you have to explicitly disable every label you use instead of being able to disable snapshots globally and override that setting for some of the labels.With it enabled it should probably disable every label unless both
com.sun:auto-snapshot
andcom.sun:auto-snapshot:label
aretrue
.The text was updated successfully, but these errors were encountered: