将zypper patch
openSUSE Leap 15.2 上的 NFS 服务器安装到最新版本并重新启动后,kubernetes 集群(Openshift 4.5)中的节点无法再挂载 NFS 卷。
NFS 服务器版本:nfs-kernel-server-2.1.1-lp152.9.12.1.x86_64
/etc/exports 包含:
/nfs 192.168.11.*(rw,sync,no_wdelay,root_squash,insecure,no_subtree_check,fsid=0)
受影响的 pod 处于 ContainerCreating 状态
kubectl describe pod/<pod_name>
给出以下错误:
Warning FailedMount 31m kubelet MountVolume.SetUp failed for volume "volume" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/c86dee2e-f533-43c9-9a1d-c4f00a1b8eef/volumes/kubernetes.io~nfs/smart-services-http-video-stream --scope -- mount -t nfs nfs.example.invalid:/nfs/volume /var/lib/kubelet/pods/c86dee2e-f533-43c9-9a1d-c4f00a1b8eef/volumes/kubernetes.io~nfs/pv-name
Output: Running scope as unit: run-r83d4e7dba1b645aca1e4693a48f45191.scope
mount.nfs: Operation not permitted
服务器仅运行 NFSv4,因此 rpcbind 已关闭且 showmount 命令不起作用。
直接挂载在 Kubernetes 节点上会导致以下错误:
sudo mount.nfs4 nfs.example.invalid:/core tmp/ -v; echo $?
mount.nfs4: timeout set for Wed Jul 21 12:16:49 2021
mount.nfs4: trying text-based options 'vers=4.2,addr=192.168.11.2,clientaddr=192.168.11.3'
mount.nfs4: mount(2): Operation not permitted
mount.nfs4: Operation not permitted
32
NFS 服务器上的 firewalld 规则:
services: ssh dhcpv6-client nfs mountd rpc-bind samba http tftp
ports: 2049/tcp 2049/udp
AppArmor 正在工作,关闭它并没有改变结果。
在更新 NFS 服务器之前,一切正常,没有进行其他配置更改。我怎样才能进一步调试它并使共享再次可挂载?