Storage: zfs.clone_copy=rebase mode fixes#17135
Merged
tomponline merged 5 commits intocanonical:mainfrom Dec 5, 2025
Merged
Conversation
d8d167e to
b8402f8
Compare
Member
Author
|
FYI @tugbataluy in case you're also looking at this one. |
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #16449 by correcting the logic for ZFS volume rebase operations. The changes introduce a rebase variable to consolidate rebase mode detection and refactor string parsing to use the modern strings.Cut function, which also fixes a bug where the origin property was incorrectly queried on snapshot names instead of dataset names.
- Introduces a
rebasevariable to centralize the logic for detecting when rebase mode is active - Updates multiple conditional checks to use the
rebasevariable for consistency - Refactors string parsing from
strings.SplitNtostrings.Cutand fixes a bug in origin property queries
941701e to
b7ab52c
Compare
c558091 to
fc970e9
Compare
fc970e9 to
c57a75c
Compare
52b7d01 to
ae36885
Compare
zfs.clone_copy=rebase mode fixes
- When copying a snapshot to a new instance with zfs.clone_copy=rebase the destination origin is now the original instance's image volume. - When copying an instance without snapshots to a new instance with zfs.clone_copy=rebase the destination origin is now the original instance's image volume. Fixes canonical#16449 Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
ae36885 to
606b087
Compare
699527f to
fc07bd8
Compare
simondeziel
previously approved these changes
Dec 5, 2025
Member
There was a problem hiding this comment.
Nice, thanks! I found a few tiny nits.
…r clarity Makes code easier to reader. Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…struction Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
…gic isn't needed when copying in `--replicate` mode Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
Signed-off-by: Thomas Parrott <thomas.parrott@canonical.com>
fc07bd8 to
2a4af30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zfs.clone_copy=rebasethe destination origin is now the original instance's image volume.zfs.clone_copy=rebasethe destination origin is now the original instance's image volume.Fixes #16449