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

fix: correct snapshot path when using share parameter #461

Merged

Conversation

wozniakjan
Copy link
Member

What type of PR is this?
/kind bug

What this PR does / why we need it:
When using the share parameter on either StorageClass or SnapshotVolumeClass, the path to snapshots would contain the share parameter twice, e.g.

/mnt/nfs/mnt/nfs/snapshot-id/src-pvc-id.tar.gz   # duplicate
/mnt/nfs/snapshot-id/src-pvc-id.tar.gz           # desired

This PR ensures it's the desired path.

Which issue(s) this PR fixes:

Fixes #459

Special notes for your reviewer:
Should I also introduce some special treatment regarding the old broken snapshot paths? For those who already have created some snapshots and they are stored in the broken path.

Does this PR introduce a user-facing change?:

bugfix: correct snapshot path when using share parameter

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/bug Categorizes issue or PR as related to a bug. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 5, 2023
@k8s-ci-robot k8s-ci-robot requested review from pohly and RaunakShah June 5, 2023 14:39
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 5, 2023
@wozniakjan
Copy link
Member Author

/test all

@wozniakjan wozniakjan mentioned this pull request Jun 5, 2023
@wozniakjan
Copy link
Member Author

wozniakjan commented Jun 5, 2023

/cc @andyzhangx

keeping as a draft for now, ptal at #459 (comment)

@k8s-ci-robot k8s-ci-robot requested a review from andyzhangx June 5, 2023 15:03
@andyzhangx
Copy link
Member

let's fix this issue in master branch first, and for the existing issue, we could add a guide asking user to migrate.

@wozniakjan wozniakjan marked this pull request as ready for review June 7, 2023 05:00
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 7, 2023
@wozniakjan
Copy link
Member Author

ack, in that case, the PR should be addressing the bug and is ready for review, thanks @andyzhangx!

I will follow-up with a migration guide, I think what @saif-88 described in #459 (comment) is feasible.

@andyzhangx
Copy link
Member

ack, in that case, the PR should be addressing the bug and is ready for review, thanks @andyzhangx!

I will follow-up with a migration guide, I think what @saif-88 described in #459 (comment) is feasible.

@wozniakjan thanks, if it cannot be automated, then provide the doc is ok assuming very few customers are using this snapshot feature on the new version. And I will publish a new release ASAP to make the impact as little as possible.

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 7, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, wozniakjan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 7, 2023
@k8s-ci-robot k8s-ci-robot merged commit 8eb52e1 into kubernetes-csi:master Jun 7, 2023
@@ -742,10 +742,10 @@ func TestCopyVolume(t *testing.T) {
uuid: "dst-pv-name",
},
prepare: func() error {
if err := os.MkdirAll("/tmp/snapshot-name/share/snapshot-name/", 0777); err != nil {
if err := os.MkdirAll("/tmp/snapshot-name/snapshot-name", 0777); err != nil {
Copy link
Member Author

Choose a reason for hiding this comment

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

I should have been more careful when writing unit tests, this case was clearly showing the bug reported by #459 and I just didn't realize it during #430

@andyzhangx andyzhangx changed the title bugfix: correct snapshot path when using share parameter fix: correct snapshot path when using share parameter Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VolumeSnapshot path
3 participants