-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Allow zfs to send replication streams when missing snapshots in the hierarchy #5285
Conversation
…ierarchy With OpenZFS 6111 we lost the ability to create replication send streams when we're missing even a single snapshot in the whole hierarchy: this commit restore this functionality. Add also relative zfs_send_008_pos.ksh script to ZFS test suite. Signed-off-by: loli10K <[email protected]>
@loli10K, thanks for your PR! By analyzing the history of the files in this pull request, we identified @kernelOfTruth, @ahrens and @behlendorf to be potential reviewers. |
Let's ask @ahrens. This definitely looks like it impacts OpenZFS upstream and would be a regression in functionality. |
Let's also ask @deiter, who authored the OpenZFS change (illumos bug 6111). For reference, here was the original code review: openzfs/openzfs#76 IIRC, the intent here was explicitly to make it an error if one of the snapshots is absent, so that you don't think you've sent all the data but in reality have not. However, the snapshot is not required on new filesystems, so this will still work:
|
From my understanding of the issue description here https://www.illumos.org/issues/6111 the problem reported was that we couldn't What was also introduced is the inability to send recursively the parent dataset and its descendants skipping the ones with no snapshot that where created before. For my own selfish use case i'm thinking rpool/swap, but there are other as well. This is almost like the problem we just solved, but it's now retroactively affecting all consolidated dataset trees we have around: either we start sending data we don't care that much about or we have to stop using -R on the parent and start to send every dataset on its own. In both cases
That was also a concern, but we emit a warning when we don't send a snapshot and the return code of
What i got wrong in this patch is the return code of |
This is getting stale, and it's also creating conflicts with other PR because of test case numbering ... any news on this? Should we close it and keep the new |
Sorry about letting this one get stale, but let's keep it open for the moment. I think there's a reasonable case to be made for continuing to support the existing long standing behavior which is useful. There are almost certainly users out there who are depending on it, even if it technically wasn't intended. What if instead of removing this check entirely we added a new command line option to The downside to this approach would be having yet another option to |
I'm fine with changing my scripts if needed |
@behlendorf i'm in favor of doing whatever will benefit the majority of users: if a new option ( |
Just heads up to whoever will eventually (or not) pick up this: it seems (zfs send) |
That's gonna cause (keep) things broken for those that use the old bad method, though I've moved on already... |
Closing for now. We'll stick with the upstream behavior and users depending on the previous behavior will need to update their scripts. Adding an option to explicitly allow for missing snapshots is the stream would be a nice feature if someone is interested in developing it. |
A tentative implementation and discussion was done in #5285. According to it a send --skip-missing|-s flag has been added. In a replication stream, when there are snapshots missing in the hierarchy, if -s is provided print a warning and ignore dataset (and its children) instead of throwing an error Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pablo Correa Gómez <[email protected]> Closes #11710
A tentative implementation and discussion was done in openzfs#5285. According to it a send --skip-missing|-s flag has been added. In a replication stream, when there are snapshots missing in the hierarchy, if -s is provided print a warning and ignore dataset (and its children) instead of throwing an error Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pablo Correa Gómez <[email protected]> Closes openzfs#11710
A tentative implementation and discussion was done in openzfs#5285. According to it a send --skip-missing|-s flag has been added. In a replication stream, when there are snapshots missing in the hierarchy, if -s is provided print a warning and ignore dataset (and its children) instead of throwing an error Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Pablo Correa Gómez <[email protected]> Closes openzfs#11710
Since the integration of OpenZFS 6111 (6635624) we lost the ability to create replication send streams when we're missing even a single snapshot in the whole hierarchy.
I don't know if OpenZFS 6111 intentionally removed this functionality but this could seriously break user scripts used for backups/replication (as demonstrated by the open issue) and slightly violates the principle of least astonishment.
Also add a new script to the ZFS test suite.
This should fix #5196