Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

The mount source path of nfs is not correct after deploy pod with using CSI NFS driver. #58

Closed
mengjieli0726 opened this issue Mar 2, 2018 · 13 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@mengjieli0726
Copy link

  1. Enable CSI by add the below parameters
API Server binary:
--allow-privileged=true
--feature-gates=CSIPersistentVolume=true,MountPropagation=true
--runtime-config=storage.k8s.io/v1alpha1=true

Controller-manager binary:
--feature-gates=CSIPersistentVolume=true

Kubelet:
--allow-privileged=true
--feature-gates=CSIPersistentVolume=true,MountPropagation=true
  1. Deploy NFS driver according to https://github.com/kubernetes-csi/drivers/tree/master/pkg/nfs/deploy/kubernetes
[root@ib17b13 kubernetes]# kubectl  get sts
NAME                     DESIRED   CURRENT   AGE
csi-attacher-nfsplugin   1         1         22d
[root@ib17b13 kubernetes]# kubectl get ds
NAME                       DESIRED   CURRENT   READY     UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
csi-nodeplugin-nfsplugin   2         2         2         2            2           <none>          22d

[root@ib17b13 kubernetes]# kubectl  get serviceaccount
NAME             SECRETS   AGE
csi-attacher     1         22d
csi-nodeplugin   1         22d
default          1         24d

[root@ib17b13 kubernetes]# kubectl get clusterrole|egrep "attach|csi"
csi-nodeplugin                                                         22d
external-attacher-runner                                               22d

[root@ib17b13 kubernetes]# kubectl  get clusterrolebinding|grep csi
csi-attacher-role                                      22d
csi-nodeplugin                                         22d
  1. Deploy a Pod using CSI volume. Before starting this example, ensure to install NFS.
[root@ib17b13 kubernetes]# showmount  -e
Export list for ib17b13:
/root/csi/nfs *

Modify pkg/nfs/examples/kubernetes/nginx.yaml, replace

csi.volume.kubernetes.io/volume-attributes: '{"server": "10.10.10.10", "share": "share "}'  as 

csi.volume.kubernetes.io/volume-attributes: '{"server": "9.21.53.23", "share": "/root/csi/nfs"}'

Create nignx:

# kubectl create -f nginx.yaml
persistentvolume "data-nfsplugin" created
persistentvolumeclaim "data-nfsplugin" created
pod "nginx" created

Check the nignx container nfs path, found mount nfs server source path is not correct.

# kubectl exec nginx -it  -- bash

image

The nfs mount source path should be 9.21.53.23:/root/csi/nfs not 9.21.53.23:/

@gyliu513
Copy link
Contributor

gyliu513 commented Mar 7, 2018

@haoqing0110 can you help check?

@haoqing0110
Copy link
Contributor

@gyliu513 @mengjieli0726
The image docker.io/k8scsi/nfsplugin:v0.1 used in csi-attacher-nfsplugin.yaml and csi-nodeplugin-nfsplugin.yaml is out-of-date, inconsistent with code and example nginx.yaml

Try to build image using Dockerfile with latest nfs driver code, source path defined in "share" will be mounted correctly.

@chakri-nelluri Can you help update official nfsplugin image with latest code? as well as image tag in csi-attacher-nfsplugin.yaml and csi-nodeplugin-nfsplugin.yaml.
Thanks.

@haoqing0110
Copy link
Contributor

@sbezverk @xing-yang @rootfs Can you help on this update?

@sbezverk
Copy link
Contributor

@gyliu513 @haoqing0110 I would suggest a couple of things:

  1. Use v0.2.0 images from quay.io for external-provisioner/external-attacher/registrar (no need to build them, just make sure your yaml points to them)
  2. build nfs image from the master of kubernetes-csi/drivers

@xing-yang
Copy link
Contributor

Hi @haoqing0110,
Can you try image links posted in this PR xing-yang@dfe7d4e? The NFS plugin image is not in the official repo yet, but @rootfs has verified it works. Thanks.

@xing-yang
Copy link
Contributor

The image links under deploy/kubernetes/ are updated to point to v0.2.0 images now. nginx.yaml is also updated. Please test again.

@gyliu513
Copy link
Contributor

@xing-yang one question, does the 0.2.0 means nfs driver version or the CSI version?

@xing-yang
Copy link
Contributor

0.2.0 is the CSI version. Our new images for NFS plugin, attacher, registrar are all tagged with 0.2.0 now.

@xing-yang
Copy link
Contributor

Actually it is both. NFS plugin version is also 0.2.0 now.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 23, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 23, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

7 participants