kubernetes-csi/csi-driver-host-path

one snapshot create many snap file & much slow

daresheep opened this issue · 5 comments

Dears,

csi-driver-host-path version : V1.4 /V1.5
external-snapshotter: v4.0

kubectl get pvc           
NAME            STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      AGE
iso-win         Bound    pvc-d9de552d-0e49-4abd-a368-f22b9c92010b   28Gi       RWO            csi-hostpath-sc   38m
iso-win-block   Bound    pvc-16e7d86f-fd29-4bb9-b5cd-0f4c37af2d9d   28Gi       RWO            csi-hostpath-sc   19m

try to create a snapshot for iso-win use below yaml:

apiVersion: snapshot.storage.k8s.io/v1beta1
kind: VolumeSnapshot
metadata:
  name: new-snapshot-demo
spec:
  volumeSnapshotClassName: csi-hostpath-snapclass
  source:
    persistentVolumeClaimName: iso-win
kubectl apply -f csi-snapshot-v1beta1.yaml 
volumesnapshot.snapshot.storage.k8s.io/new-snapshot-demo created

watch at csi-data-path ,a lot of snap files created. each 1min .

image

image

Here is some logs for hostpath

kubectl logs -f csi-hostpathplugin-0 hostpath

I0203 11:12:21.879787       1 identityserver.go:40] Using default GetPluginInfo
I0203 11:12:21.879795       1 server.go:123] GRPC response: {"name":"hostpath.csi.k8s.io","vendor_version":"v1.4.0-rc2-0-gee6beeaf"}
I0203 11:12:21.883128       1 server.go:117] GRPC call: /csi.v1.Controller/CreateSnapshot
I0203 11:12:21.883142       1 server.go:118] GRPC request: {"name":"snapshot-023764b9-7119-4acf-8cd7-33ba0712c5cf","source_volume_id":"e5b4c966-656e-11eb-894d-5e012443d7b4"}
I0203 11:12:21.883640       1 controllerserver.go:337] Creating snapshot of Raw Block Mode Volume


I0203 11:14:21.875027       1 identityserver.go:40] Using default GetPluginInfo
I0203 11:14:21.875035       1 server.go:123] GRPC response: {"name":"hostpath.csi.k8s.io","vendor_version":"v1.4.0-rc2-0-gee6beeaf"}
I0203 11:14:21.877528       1 server.go:117] GRPC call: /csi.v1.Controller/CreateSnapshot
I0203 11:14:21.877539       1 server.go:118] GRPC request: {"name":"snapshot-023764b9-7119-4acf-8cd7-33ba0712c5cf","source_volume_id":"e5b4c966-656e-11eb-894d-5e012443d7b4"}
I0203 11:14:21.878870       1 controllerserver.go:337] Creating snapshot of Raw Block Mode Volume


I0203 11:15:21.891059       1 identityserver.go:40] Using default GetPluginInfo
I0203 11:15:21.891067       1 server.go:123] GRPC response: {"name":"hostpath.csi.k8s.io","vendor_version":"v1.4.0-rc2-0-gee6beeaf"}
I0203 11:15:21.892157       1 server.go:117] GRPC call: /csi.v1.Controller/CreateSnapshot
I0203 11:15:21.892163       1 server.go:118] GRPC request: {"name":"snapshot-023764b9-7119-4acf-8cd7-33ba0712c5cf","source_volume_id":"e5b4c966-656e-11eb-894d-5e012443d7b4"}
I0203 11:15:21.892466       1 controllerserver.go:337] Creating snapshot of Raw Block Mode Volume
I0203 11:15:23.578579       1 server.go:117] GRPC call: /csi.v1.Identity/Probe


I0203 11:17:21.870112       1 server.go:123] GRPC response: {"name":"hostpath.csi.k8s.io","vendor_version":"v1.4.0-rc2-0-gee6beeaf"}
I0203 11:17:21.872851       1 server.go:117] GRPC call: /csi.v1.Controller/CreateSnapshot
I0203 11:17:21.872873       1 server.go:118] GRPC request: {"name":"snapshot-023764b9-7119-4acf-8cd7-33ba0712c5cf","source_volume_id":"e5b4c966-656e-11eb-894d-5e012443d7b4"}
I0203 11:17:21.873669       1 controllerserver.go:337] Creating snapshot of Raw Block Mode Volume
I0203 11:17:23.578983       1 server.go:117] GRPC call: /csi.v1.Identity/Probe

@daresheep Can you please confirm and post the cmd output, if multiple snapshots are created for the same PV and same VolumeSnapshot CR. Or if not, then can you please monitor the generation id is same everytime on the reconciliation or the controller is creating the same snapshot multiple times.

As discussed in the other PR, the logs with CreateSnapshot seems to be just the reconcilation log for checking the snapshot

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

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-triage-robot: Closing this issue.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue or PR with /reopen
  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please 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.