openebs-archive / dynamic-nfs-provisioner

Operator for dynamically provisioning an NFS server on any Kubernetes Persistent Volume. Also creates an NFS volume on the dynamically provisioned server for enabling Kubernetes RWX volumes.
Apache License 2.0
168 stars 58 forks source link

nfs mount failed Not supported #140

Closed fragolinux closed 12 months ago

fragolinux commented 2 years ago

Describe the bug: A clear and concise description of what the bug is. installed openebs on top of k3d 5.4.4 as an helmrelease using the nfs-provisioner chart, with this values (indentation is because of the helmrelease yaml, this block is under spec.values):

    ndm:
      enabled: false
    ndmOperator:
      enabled: false
    localprovisioner:
      enabled: false
    openebsNDM:
      enabled: false
    nfsProvisioner:
      enabled: true
    nfsStorageClass:
      name: nfs
      reclaimPolicy: Retain
      backendStorageClass: "local-path"

I then create my deployments (always via helm releases) which request a couple of pvc using the given storageclass name "nfs", i can see the pvc correctly created, while they can't be then mounted from the requesting pods, with these errors in event logs:

Mounting arguments: -t nfs 10.43.4.138:/ /var/lib/kubelet/pods/c2027ba1-b6c0-4e85-a842-c336a357992b/volumes/kubernetes.io~nfs/pvc-32ae907a-2045-4658-aa86-33512a6b9867
Output: mount: mounting 10.43.4.138:/ on /var/lib/kubelet/pods/c2027ba1-b6c0-4e85-a842-c336a357992b/volumes/kubernetes.io~nfs/pvc-32ae907a-2045-4658-aa86-33512a6b9867 failed: Not supported

10.43.x.x is the service network, pods are on the 10.42.x.x network...

Expected behaviour: pods starting with nfs pvc mounted

The output of the following commands will help us better understand what's going on:

Anything else we need to know?: Add any other context about the problem here.

Environment details:

fragolinux commented 2 years ago

more details... going inside 1 of the openebs nfs-pvc pods, i get this:

root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # exportfs
/nfsshare       <world>
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # cat /etc/exports
/nfsshare *(rw,fsid=0,async,no_subtree_check,no_auth_nlm,insecure,no_root_squash)
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # mkdir -p t
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # mount -t nfs 127.0.0.1:/nfsshare t
mount.nfs: mounting 127.0.0.1:/nfsshare failed, reason given by server: No such file or directory
mount: mounting 127.0.0.1:/nfsshare on t failed: Not supported
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # ls /
Dockerfile  README.md  bin  dev  etc  home  lib  media  mnt  nfsshare  opt  proc  root  run  sbin  srv  sys  usr  var
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ # ls /nfsshare/
root@nfs-pvc-e98ed6ad-f078-4b24-8cf4-687ede0c872a-5fc88768cb-mwtk7:~ #
fragolinux commented 2 years ago

following this guide i have now working writing and reading pods, thanks to mountOptions vers: 4.1 parameter... but, how to set this using the values in a helmrelease? Don't see a section in templates...

pentago commented 2 years ago

Submitted PR to fix this thing, it bothered me too on k3d local cluster.

fragolinux commented 2 years ago

@pentago thanks! Hope pr will be merged soon