-
Bug
-
Resolution: Duplicate
-
Undefined
-
None
-
4.8
-
None
-
None
-
Unspecified
-
If docs needed, set a value
-
-
3/14: telco review, aligned with OCPBUGSM-32429
Description of problem:
When creating a pod with block volume when using the kata-runtime I get this error:
"message: 'CreateContainer failed: QMP command failed: Could not open ''/dev/sdb'': Permission denied: unknown'"
Version-Release number of selected component (if applicable):
Client Version: 4.8.0-0.nightly-2021-06-13-101614
Server Version: 4.8.0-0.nightly-2021-07-24-211147
Kubernetes Version: v1.21.1+051ac4f
How reproducible:
Constantly
Steps to Reproduce:
Follow the steps in this test case: https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-19110
Actual results:
"message: 'CreateContainer failed: QMP command failed: Could not open ''/dev/sdb'': Permission denied: unknown'"
Expected results:
We can use the block volume within the pod.
Additional info:
yaml file to reproduce this issue:
```
oc create -f - <<EOF
apiVersion: v1
kind: PersistentVolume
metadata:
name: mypv-iscsi-lun0
spec:
capacity:
storage: 2Gi
accessModes:
- ReadWriteOnce
iscsi:
targetPortal: 172.30.124.67:3260
iqn: iqn.2016-04.test.com:storage.target00
lun: 0
iface: default
fsType: ext4
readOnly: false
initiatorName: iqn.2016-04.test.com:test.img
persistentVolumeReclaimPolicy: Retain
volumeMode: Block
storageClassName: 'iscsi'
EOF
oc create -f - <<EOF
kind: Pod
apiVersion: v1
metadata:
name: mypod-block0
labels:
name: frontendhttp
spec:
containers: - name: myfrontend
image: quay.io/openshifttest/storage@sha256:a05b96d373be86f46e76817487027a7f5b8b5f87c0ac18a246b018df11529b40
ports: - containerPort: 80
name: "http-server"
volumeDevices: - devicePath: "/dev/dblock"
name: local
volumes: - name: local
persistentVolumeClaim:
claimName: mypvc-lun0
—
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mypvc-lun0
spec:
volumeName: mypv-iscsi-lun0
accessModes: - ReadWriteOnce
resources:
requests:
storage: 2Gi
volumeMode: Block
storageClassName: 'iscsi'
EOF
```