Skip to content

Allow reconciliation if single dataset is missing snapshots #54

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tschettervictor
Copy link
Collaborator

#53

@tschettervictor
Copy link
Collaborator Author

If you do like this, you'll have to adjust the tests.

Copy link
Owner

@aaronhurt aaronhurt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I'm good with this if we can make existing tests pass - meaning it doesn't alter existing expectations and is a non-breaking change. It may be time to move snapshot validation out into it's own function.

@tschettervictor
Copy link
Collaborator Author

tschettervictor commented Apr 17, 2025

@aaronhurt

I've merged the loops.

This is working with the following tests

Run the script a few times.
Create a snapshot of a dataset and zfs send/recv it to another nested location.
Delete the snapshot you just created.
Run with ALLOW_RECONCILIATION=0 and make sure it skips.
Run with ALLOW_RECONCILIATION=1 and make sure it completes.

I had to change the loop to loop through the source snaps as opposed to the destination snaps. This is because the source is the authoritative side of the set.

@tschettervictor
Copy link
Collaborator Author

I'm now soring snaps in reverse as the -r will remove them recursively, causing an error when the deeper one are trying to be destroyed.

I tried to see what you were doing with the tests, but can't seem to figure it out quite.

@tschettervictor
Copy link
Collaborator Author

Been running this now over a couple days, doing cloning, send/recv etc...

Works great.

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.

2 participants