Skip to content

Dynamic NFS provisioner should not share the same directory between PVs #4982

Closed
@stv0g

Description

Is this a bug report or feature request?

  • Bug Report

Deviation from expected behavior:

All PVs created by the dynamic NFS provisioner shares the same directory of the NFS export.

Expected behavior:

Every PV created by the provisioner should get a dedicated sub-directory within the share.

See also: #2062 (comment)

From: https://github.com/rook/rook/blob/master/pkg/operator/nfs/provisioner.go#L147

return &v1.NFSVolumeSource{
				ReadOnly: false,
				Server:   nfsService.Spec.ClusterIP,
				Path:     "/" + export.PersistentVolumeClaim.ClaimName,
			}, nil

I assume we need a PV-specific component afterexport.PersistentVolumeClaim.ClaimName.

How to reproduce it (minimal and precise):

  1. Follow the NFS quick start guide
  2. Create two PVC with the new nfs storage class
  3. Place a file in one PV
  4. Observe that the file appears in the other PV

Environment:

  • OS (e.g. from /etc/os-release): Ubuntu 18.04
  • Kernel: Linux k8s-0.edgy.vms.0l.de 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Cloud provider or hardware configuration: self-hosted KVM, 3 nodes, full HA
  • Rook version: v1.2.4
  • Storage backend version: does not apply
  • Kubernetes version: v1.17.2
  • Kubernetes cluster type: Rancher RKE

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions