yandex-cloud / k8s-csi-s3

GeeseFS-based CSI for mounting S3 buckets as PersistentVolumes
Other
571 stars 98 forks source link

MountVolume.MountDevice failed for volume / Timeout waiting for mount #144

Open wccropper opened 4 weeks ago

wccropper commented 4 weeks ago

I am trying to use persistent manual bucket and share it across pods:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: bucket-csi-s3
provisioner: ru.yandex.s3.csi
parameters:
  mounter: geesefs
  options: "--memory-limit 1000 --dir-mode 0777 --file-mode 0666"
  bucket: csi-s3-1
  endpoint: https://<company.internal.s3.endpoint>    # actual SSL cert, not self-signed
  csi.storage.k8s.io/provisioner-secret-name: csi-s3-secret
  csi.storage.k8s.io/provisioner-secret-namespace: csi-s3
  csi.storage.k8s.io/controller-publish-secret-name: csi-s3-secret
  csi.storage.k8s.io/controller-publish-secret-namespace: csi-s3
  csi.storage.k8s.io/node-stage-secret-name: csi-s3-secret
  csi.storage.k8s.io/node-stage-secret-namespace: csi-s3
  csi.storage.k8s.io/node-publish-secret-name: csi-s3-secret
  csi.storage.k8s.io/node-publish-secret-namespace: csi-s3
reclaimPolicy: Retain
apiVersion: v1
kind: PersistentVolume
metadata:
  name: manualbucket-with-path
spec:
  storageClassName: bucket-csi-s3
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteMany
  claimRef:
    namespace: csi-s3
    name: bucket-csi-s3-manual-pvc
  csi:
    driver: ru.yandex.s3.csi
    controllerPublishSecretRef:
      name: csi-s3-secret
      namespace: csi-s3
    nodePublishSecretRef:
      name: csi-s3-secret
      namespace: csi-s3
    nodeStageSecretRef:
      name: csi-s3-secret
      namespace: csi-s3
    volumeAttributes:
      capacity: 10Gi
      mounter: geesefs
      options: --memory-limit 1000 --dir-mode 0777 --file-mode 0666
    volumeHandle: manualbucket/path
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: bucket-csi-s3-manual-pvc
spec:
  storageClassName: ""
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
apiVersion: v1
kind: Pod
metadata:
  name: csi-s3-test-nginx
  namespace: csi-s3
spec:
  containers:
   - name: csi-s3-test-nginx
     image: nginx
     volumeMounts:
       - mountPath: /usr/share/nginx/html/s3
         name: webroot
  volumes:
   - name: webroot
     persistentVolumeClaim:
       claimName: bucket-csi-s3-manual-pvc
       readOnly: false

The STORAGECLASS/PVC/PV all create correctly, but the POD gets error "MountVolume.MountDevice failed for volume "manualbucket-with-path" : rpc error: code = Unknown desc = Timeout waiting for mount" and never completes.

SeanHai commented 2 weeks ago

I also encountered the same problem, anyone can help?

xincan commented 6 days ago

apiVersion: v1 kind: PersistentVolumeClaim metadata: name: bucket-csi-s3-manual-pvc spec: storageClassName: "" accessModes: