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

Recursive setting cannot be enabled if trailing space present #901

Closed
nlflint opened this issue Mar 29, 2024 · 1 comment
Closed

Recursive setting cannot be enabled if trailing space present #901

nlflint opened this issue Mar 29, 2024 · 1 comment

Comments

@nlflint
Copy link

nlflint commented Mar 29, 2024

Problem:
My sanoid runs on a backup pool, with a backup template, but it's not pruning old snapshots.

My config:

[backup]
	use_template = backup
	recursive = yes 

[template_backup]
	autoprune = yes
	frequently = 0
	hourly = 6 
	daily = 7
	monthly = 6
	yearly = 0

	### don't take new snapshots - snapshots on backup
	### datasets are replicated in from source, not
	### generated locally
	autosnap = no

	### monitor hourlies and dailies, but don't warn or
	### crit until they're over 48h old, since replication
	### is typically daily only
	hourly_warn = 2880
	hourly_crit = 3600
	daily_warn = 48
	daily_crit = 60

Cause: An extra "space" at the end of recursive = yes . This extra space left the setting in its default value, so recursive wasn't set. A few things made this difficult for me to debug:

  1. Debug output should explicitly show the value of the recursive flag but it does not. I had never used the debug output before and I looked for this flag at one point in my debugging, but it's not in the output. Someone more experienced could have noticed only 1 config and inferred the flag wasn't set, since the configs weren't unrolled. I had never used --debug before so I just saw 1 config and it matched what I wrote in the sanoid.conf, so it looked good.

  2. An unreadable value from the config should be a halting error. It should not be silently ignored.

@phreaker0
Copy link
Collaborator

@nlflint this is already fixed in master 7ab0ac0

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

No branches or pull requests

2 participants