nfs-ganesha-server-and-external-provisioner icon indicating copy to clipboard operation
nfs-ganesha-server-and-external-provisioner copied to clipboard

NFS share is not created when PVC and PV are not created via app/deploymentset.

Open ganniterix opened this issue 2 years ago • 8 comments

I have deployed the NFS service and it works when volumes are automatically created with the volumeClaimTemplate. An NFS share is generated and all is fine. However, when I create a PVC and PV, it does not seem to generate the relative NFS share.

Storage class

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: mynfs-nfs
mountOptions:
- vers=4.1
provisioner: mynfs/nfs
reclaimPolicy: Delete
volumeBindingMode: Immediate

PV (create with and without provisioner_id, no change)

apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 30Gi
  claimRef:
    apiVersion: v1
    kind: PersistentVolumeClaim
    name: pvc-storage
    namespace: shares
  nfs:
    path: /export/storage
    server: 10.158.1.1
  persistentVolumeReclaimPolicy: Retain
  storageClassName: mynfs-nfs
  volumeMode: Filesystem

PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pvc-storage
  namespace: shares
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 30Gi
  storageClassName: mynfs-nfs
  volumeMode: Filesystem
  volumeName: storage

I did notice that the EXPORT section is not present when getting the yaml details of the volume, and also vfs.conf is not updated.

*** EDIT ***

The path mentioned above, /export/storage is also not created. It seems the whole folder, and export initialization is skipped.

ganniterix avatar May 12 '22 15:05 ganniterix

Why are you trying to create PV manually? nfs-server-provisioner should do this automatically

kvaps avatar May 12 '22 15:05 kvaps

Because I want to create a volume, that is to be shared as an NFS share externally, and I would like to not have a name that is like pvc-***********.

ganniterix avatar May 12 '22 16:05 ganniterix

I have worries that this will not work. nfs-server-provisioner generates config for each PVC, then exports it, then creates PV. This is main workflow.

kvaps avatar May 12 '22 16:05 kvaps

Does this mean that there is no way to manually set the name of a share?

ganniterix avatar May 16 '22 15:05 ganniterix

yes, currently there in no such opportunity

kvaps avatar May 16 '22 15:05 kvaps

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Mark this issue or PR as rotten with /lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Aug 14 '22 15:08 k8s-triage-robot

@kvaps How can one set up PV if he disabled StorageClass?

DekelDevunet avatar Aug 22 '22 15:08 DekelDevunet

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle rotten
  • Close this issue or PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Sep 21 '22 16:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-triage-robot avatar Oct 21 '22 17:10 k8s-triage-robot

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Reopen this issue with /reopen
  • Mark this issue as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Oct 21 '22 17:10 k8s-ci-robot