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

CreateSnapshot being called several times when only one Snapshot is wanted. #465

Closed
Jiawei0227 opened this issue Jan 29, 2021 · 14 comments
Closed
Assignees
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@Jiawei0227
Copy link
Contributor

I am testing the csi-snapshotter metrics. And I had this little experiment in my env. Basically I just created one VolumeSnapshot. And the snapshot was created successfully.
When I check my snapshotter metrics, it seems that it has recorded a lot of CreateVolume event. And I checked my driver log, it also has a lot of CreateVolume call like 20ish times.

I checked with @msau42 and she mentioned this has been discussed here:
#165 (comment)

So this is just a follow-up to discuss what should we do about it.

@Jiawei0227
Copy link
Contributor Author

/assign @xing-yang

@xing-yang
Copy link
Collaborator

Which version of external-snapshotter are you using?

@Jiawei0227
Copy link
Contributor Author

I am using v3.0.1, does this get fixed in v4?

@msau42
Copy link
Collaborator

msau42 commented Jan 29, 2021

My understanding is that this is inherent due to 'CreateSnapshot' being overloaded as a 'GetSnapshot' use case, so it won't be fixed until we add a GetSnapshot call in CSI

@xing-yang
Copy link
Collaborator

xing-yang commented Jan 29, 2021

ListSnapshots with snapshot_id serves the same purpose as GetSnapshot so we don't really need a new GetSnapshot RPC. The reason that we decided not to use ListSnapshots is that it is optional. CreateSnapshot is idempotent so it gives us the same output as GetSnapshot when calling it repeatedly. I remember we did discuss about this during the review and decided to go with this approach.

CC @yuxiangqian

@daresheep
Copy link

daresheep commented Feb 2, 2021

Dears,

Is there any updates?

i had testing on V4, and this issue already exist.

i had a big PVC about 30G, and i create snapshot for this pvc. it create a lot of snap files.

There is some information about this issue.

image
image
image

thank you.

@xing-yang
Copy link
Collaborator

@daresheep Which CSI driver are you using? CreateSnapshot must be idempotent. This means if CreateSnapshot is called multiple times for the same create snapshot request, the storage system should only create 1 snapshot, not multiple snapshots. This looks like a problem with the CSI driver and the storage system.

@daresheep
Copy link

thank you so much for your replay.

The csi driver is https://github.com/kubernetes-csi/csi-driver-host-path and the version is V1.5.0 relase 4 days ago.

I'll try lower version for this later.

Thanks again.

@xing-yang
Copy link
Collaborator

@daresheep can you open an issue for the csi hostpath driver here? https://github.com/kubernetes-csi/csi-driver-host-path/issues

@daresheep
Copy link

Ok, The issue created here:

kubernetes-csi/csi-driver-host-path#243

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label May 4, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jun 3, 2021
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

6 participants