Skip to content

Failed to create snapshot #509

@znaive

Description

@znaive

version information

k8s: 1.23.0
csi-driver-nfs : v4.4.0

volumesnapshotclass

$ kubectl get volumesnapshotclass
NAME                DRIVER           DELETIONPOLICY   AGE
csi-nfs-snapclass   nfs.csi.k8s.io   Delete           3h25m

$ cat snapshotclass-nfs.yaml
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshotClass
metadata:
  name: csi-nfs-snapclass
driver: nfs.csi.k8s.io
deletionPolicy: Delete

volumesnapshot

$ cat snapshot-nfs-dynamic.yaml
---
apiVersion: snapshot.storage.k8s.io/v1
kind: VolumeSnapshot
metadata:
  name: test-nfs-snapshot
spec:
  volumeSnapshotClassName: csi-nfs-snapclass
  source:
    persistentVolumeClaimName: win2012-snapshot

storageclass

cat storageclass-nfs.yaml
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
  server: 172.28.100.37
  share: /data
  # csi.storage.k8s.io/provisioner-secret is only needed for providing mountOptions in DeleteVolume
  # csi.storage.k8s.io/provisioner-secret-name: "mount-options"
  # csi.storage.k8s.io/provisioner-secret-namespace: "default"
reclaimPolicy: Delete
volumeBindingMode: Immediate
allowVolumeExpansion: true

volumesnapshot

$ kubectl get vs
NAME                READYTOUSE   SOURCEPVC          SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS       SNAPSHOTCONTENT                                    CREATIONTIME   AGE
test-nfs-snapshot   false        win2012-snapshot                                         csi-nfs-snapclass   snapcontent-e08b4ce1-2e9b-4d44-9128-e04839434e23                  19m

pvc

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  finalizers:
  - kubernetes.io/pvc-protection
  - snapshot.storage.kubernetes.io/pvc-as-source-protection
  name: win2012-snapshot
  namespace: default
  resourceVersion: "22827160"
  uid: ef9fb0fa-5d30-4db7-a347-ba1a0cb96a74
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 20Gi
  storageClassName: nfs-csi
  volumeMode: Filesystem
  volumeName: pvc-ef9fb0fa-5d30-4db7-a347-ba1a0cb96a74
status:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 20Gi
  phase: Bound

log

snapshot-controller

kubectl logs snapshot-controller-7d8977cd65-dmhdm -n kube-system -f
image

csi-nfs-controller

kubectl logs csi-nfs-controller-5cc4566d6-skhxb -n kube-system -c csi-snapshotter
image
It keeps looping with this error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions