访问 Trident 提供的 NFS PV 的 Pod 失败,某些节点上的权限被拒绝
适用场景
- 适用于 Kubernetes/Openshift 的 Trident
- 基于 SELinux 的 Redhat Enterprise Linux ( RHEL ) 7.9 或 8.x 节点
问题描述
在将 POD 部署到(大多数情况下)在启用了 SELinux 的情况下运行的新部署的 RHEL 节点时, Pod 会联机并提供 Trident 提供的 ONONTAP -NAS PV ,但在定义的挂载上失败,并显示以下错误:
sh-4.4$ cd
/mnt/pvc-trident-test/
sh-4.4$ touch test
touch: cannot touch 'test': Permission denied
从基于节点的挂载正常访问:
[<USER>@<NODE_NAME> trident_test] # mkdir test_of_directory
[<USER>@<NODE_NAME> trident_test] # touch test-of-directory/touched_file
[<USER>@<NODE_NAME> trident_test] # ls -la test-of-directory
total 8
drwxrwxrwx. 2 1001600000 root 4096 Sep 14 10:35 .
drwxrwxrwx. 3 1001600000 root 4096 Sep 14 10:35 ..
-rw-rw-rw-. 1 1001600000 root 0 Sep 14 10:35 touched_file