External-storage: nfs-client "unable to set extended attributes on directory"

Created on 16 Jun 2018  路  8Comments  路  Source: kubernetes-retired/external-storage

I deployed nfs-client following guide and encountered this error in nfs-client-provisioner pod.

E0616 19:46:09.799148       1 goroutinemap.go:166] Operation for "provision-monitoring/elasticsearch-logging-elasticsearch-logging-0[86d40bd7-719b-11e8-9d44-e0d55e669edf]" failed. 
No retries permitted until 2018-06-16 19:48:11.799122607 +0000 UTC (durationBeforeRetry 2m2s). 
Error: "unable to set extended attributes on directory to provision new pv: xattr.
Set /persistentvolumes/monitoring-elasticsearch-logging-elasticsearch-logging-0-pvc-86d40bd7-719b-11e8-9d44-e0d55e669edf namespace: operation not supported"

I use centos and my nfs server supports nfsv4.

My /etc/exports is

/var/nfs   172.30.1.0/24(rw,sync,fsid=0,no_root_squash)

And grep nfs /proc/mounts showed me

172.30.1.25:/var/nfs /var/lib/kubelet/pods/56a99b50-719b-11e8-9d44-e0d55e669edf/volumes/kubernetes.io~nfs/nfs-client-root nfs 
rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=172.30.1.25,mountvers=3,
mountport=20048,mountproto=udp,local_lock=none,addr=172.30.1.25 0 0
arenfs-client

Most helpful comment

All 8 comments

ive done some more troubleshooting and believe the issues is cause of xattr on the NFS.
testing this by running - setfattr on the NFS on the master node

touch test.txt
setfattr -n user.comment -v "some comment" test.txt

i get the following
setfattr: test.txt: Operation not supported

but doing this on the root filesysten it works
getfattr -d test.txt

Wonder could I rebuild the image and remove the below from the nfs-client-provisioner code? As don't see the meta data being used anywhere else.

if err := xattr.Set(fullPath, "namespace", []byte(pvcNamespace)); err != nil {
return nil, errors.New("unable to set extended attributes on directory to provision new pv: " + err.Error())
}

I have the same issue. I downgraded to 2.0.1 version and it works correctly.

671 is related to this issue. It seems like nfs doesn't support xattr officially. Were there some changes recently?

Yes, I merged a PR about setting extended attributes on Friday. Please downgrade in the meantime. I will revert the change today.

image pushed, should be fixed
/area nfs-client

Right now it works with the latest image, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

richstokes picture richstokes  路  9Comments

wyllys66 picture wyllys66  路  11Comments

cuisongliu picture cuisongliu  路  4Comments

iboware picture iboware  路  10Comments

shadycuz picture shadycuz  路  9Comments