Closed wdurairaj closed 5 years ago
Actually running the pod in privileged mode allows data writes on the exported location
kind: Pod
apiVersion: v1
metadata:
name: podfiletestw2
spec:
containers:
- name: nginx
securityContext:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
allowPrivilegeEscalation: true
image: nginx
volumeMounts:
- name: export
mountPath: /export
restartPolicy: Always
volumes:
- name: export
persistentVolumeClaim:
claimName: pvcfile-sandesh4
@nilangekarss is this real fix going as part of 3.2 ?
Leena to verify the fix in OpenShift environment
Verified with below ymls, able to mount and write data
kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: sc-file2 provisioner: hpe.com/hpe parameters: name: TEST_SHARE size: "100" filePersona: "" fpg: rC_r6_FPG
kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvcfile2-rc spec: accessModes:
kind: Pod apiVersion: v1 metadata: name: pod-file2-rc spec: containers:
'''
Closing based on the Raghavendra's comment
Looking at the dory logs, the
chcon
is failing with an error and bind mount is failing with rc=1 (exit code)