PodA is mounting an NFS share in readOnly mode.
PodA spec:
spec:
containers:
- name: podA
image: busybox
command: [ "sh", "-c", "sleep 3600" ]
volumeMounts:
- mountPath: /data/pod
name: pvc-data
volumes:
- name: pvc-data
persistentVolumeClaim:
claimName: pvc-data
readOnly: trueThe volume is mounted on the Worker and Pod in readOnly mode.
10.###.###.250:/srv/nfs_share on /var/vcap/data/kubelet/pods/2b21e33c-####-####-####-##########/volumes/kubernetes.io~nfs/pvc-data type nfs (ro,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.###.###.250,mountvers=3,mountport=43606,mountproto=udp,local_lock=none,addr=10.###.###.250)
PodB is attempting to mount the same NFS share in readWrite mode.
spec:
containers:
- name: podB
image: busybox
command: [ "sh", "-c", "sleep 3600" ]
volumeMounts:
- mountPath: /data/pod
name: pvc-dataB
volumes:
- name: pvc-dataB
persistentVolumeClaim:
claimName: pvc-dataHowever the volume is mounted on the Worker in readOnly mode. It should be mounted in ReadWrite mode.
10.###.###.250:/srv/nfs_share on /var/vcap/data/kubelet/pods/e4cf0a27-####-####-####-##########/volumes/kubernetes.io~nfs/pvc-data type nfs (ro,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=10.###.###.250,mountvers=3,mountport=43606,mountproto=udp,local_lock=none,addr=10.###.###.250)
TKGi 1.22 and Stemcell 1.844
The first pod starts on the Worker node and mounts the share in readOnly mode. This causes subsequent mounts of the same share to also be mounted in readOnly on the same Worker.
Upgrade stemcell to 1.1193.
If stemcell upgrade is not possible, update the Pod spec to mount the volume in readWrite mode to workaround the issue.