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

issues with incorrect NFS mount path for creating rwx volumes in Openshift 4.14.25. Mount path from backend Netapp svm is not considered. #943

Open
barani129 opened this issue Oct 31, 2024 · 2 comments
Labels

Comments

@barani129
Copy link

Describe the bug
We are trying to create a RWX NFS volume with a NFS backend (say: svm-k8s-cluster and backend is /svm_k8s-cluster_NFS_vol).
But trident operator ignores the mount path from backend and updates volume.source.volumeAttributes.internalName with trident_<pvc_name>), this is the expected behaviour as per below code, but why the NFS mount path from the actual backend is not considered in the code?

func ConstructOntapNASVolumeAccessPath(

Environment
Openshift 4.14.25

  • Trident version: 24.02.1
  • Trident installation flags used: [e.g. -d -n trident --use-custom-yaml]
  • Container runtime: [e.g. Docker 19.03.1-CE]
  • Kubernetes version: 1.27.13
  • Kubernetes orchestrator: Openshift 4.14.25
  • Kubernetes enabled feature gates: NA
  • OS: CoreOS (RHEL 9.2)
  • NetApp backend types: ONTAP 9

To Reproduce
Steps to reproduce the behavior:
Create a NFS backendconfig with svm name, and create an actual ontap NFS volume with mountpath /svm_k8s_cluster_NFS_vol)

Expected behavior
trident updates internalName (mountpath) to /trident_pvc-name instead of //trident_pvc-name

@barani129 barani129 added the bug label Oct 31, 2024
@sjpeeris
Copy link
Collaborator

@barani129 is this causing a problem for you in your environment ? Do you mean that Trident is missing an / in the internalName ?

@barani129
Copy link
Author

Hi @sjpeeris , thanks for responding. Trident volumes are created with an "/" + internalName as seen in the code, but the problem is that it is hardcoded, so mounting the volumes at non-root paths at netapp backend becomes a problem, the backend administrator is forced to give root path access of the SVM to the k8s clusters volumes.

The expectation is that when a volumes get created with the given NFS Storage class (mounting volumes at /svm_nfs_vol), the internalName should be updated to include /svm_nfs_vol like /svm_nfs_vol/volumeName rather than /volumeName (which is accessing / path irrespective of NFS SC configuration).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants