Description of problem: Import preallocation disk is failed while the storageClass is OCS. $ oc get dv vm-example-disk-1-xhfmc -o yaml release-4.9 apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: creationTimestamp: "2021-10-27T00:57:16Z" generation: 38 labels: kubevirt.io/created-by: 76236aa3-acfe-497f-b1cf-58ac23bab677 name: vm-example-disk-1-xhfmc namespace: default ownerReferences: - apiVersion: kubevirt.io/v1 blockOwnerDeletion: true controller: true kind: VirtualMachine name: vm-example uid: 76236aa3-acfe-497f-b1cf-58ac23bab677 resourceVersion: "11633016" uid: e05071f2-7375-48ac-a914-3505019a5645 spec: preallocation: true pvc: accessModes: - ReadWriteMany resources: requests: storage: 1Gi storageClassName: ocs-storagecluster-ceph-rbd volumeMode: Block source: blank: {} status: conditions: - lastHeartbeatTime: "2021-10-27T00:57:16Z" lastTransitionTime: "2021-10-27T00:57:16Z" message: PVC vm-example-disk-1-xhfmc Bound reason: Bound status: "True" type: Bound - lastHeartbeatTime: "2021-10-27T01:39:05Z" lastTransitionTime: "2021-10-27T00:57:16Z" status: "False" type: Ready - lastHeartbeatTime: "2021-10-27T01:39:05Z" lastTransitionTime: "2021-10-27T01:39:05Z" message: "Unable to create blank image: signal: killed dd execution failed kubevirt.io/containerized-data-importer/pkg/system.executeWithLimits \t/remote-source/app/pkg/system/prlimit.go:178 kubevirt.io/containerized-data-importer/pkg/system.ExecWithLimits \t/remote-source/app/pkg/system/prlimit.go:111 kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock \t/remote-source/app/pkg/image/qemu.go:294 main.main \t/remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main \t/usr/lib/golang/src/runtime/proc.go:204 runtime.goexit \t/usr/lib/golang/src/runtime/asm_amd64.s:1374 Could not preallocate blank block volume at /dev/cdi-block-volume with size 1Gi kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock \t/remote-source/app/pkg/image/qemu.go:297 main.main \t/remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main \t/usr/lib/golang/src/runtime/proc.go:204 runtime.goexit \t/usr/lib/golang/src/runtime/asm_amd64.s:1374" reason: OOMKilled status: "False" type: Running phase: ImportInProgress progress: N/A restartCount: 13 $ oc logs importer-vm-example-disk-1-xhfmc release-4.9 I1027 01:44:06.290183 1 importer.go:52] Starting importer I1027 01:44:06.291577 1 importer.go:114] Preallocating blank block volume E1027 01:44:06.776075 1 prlimit.go:174] dd failed output is: E1027 01:44:06.776099 1 prlimit.go:175] E1027 01:44:06.776106 1 prlimit.go:176] E1027 01:44:06.776149 1 importer.go:119] signal: killed dd execution failed kubevirt.io/containerized-data-importer/pkg/system.executeWithLimits /remote-source/app/pkg/system/prlimit.go:178 kubevirt.io/containerized-data-importer/pkg/system.ExecWithLimits /remote-source/app/pkg/system/prlimit.go:111 kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock /remote-source/app/pkg/image/qemu.go:294 main.main /remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main /usr/lib/golang/src/runtime/proc.go:204 runtime.goexit /usr/lib/golang/src/runtime/asm_amd64.s:1374 Could not preallocate blank block volume at /dev/cdi-block-volume with size 1Gi kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock /remote-source/app/pkg/image/qemu.go:297 main.main /remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main /usr/lib/golang/src/runtime/proc.go:204 runtime.goexit /usr/lib/golang/src/runtime/asm_amd64.s:1374 $ oc describe dv vm-example-disk-1-xhfmc Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Pending 46m datavolume-controller PVC vm-example-disk-1-xhfmc Pending Normal Bound 46m datavolume-controller PVC vm-example-disk-1-xhfmc Bound Normal ImportInProgress 46m datavolume-controller Import into vm-example-disk-1-xhfmc in progress Warning OOMKilled 4m55s (x14 over 46m) datavolume-controller Unable to create blank image: signal: killed dd execution failed kubevirt.io/containerized-data-importer/pkg/system.executeWithLimits /remote-source/app/pkg/system/prlimit.go:178 kubevirt.io/containerized-data-importer/pkg/system.ExecWithLimits /remote-source/app/pkg/system/prlimit.go:111 kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock /remote-source/app/pkg/image/qemu.go:294 main.main /remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main /usr/lib/golang/src/runtime/proc.go:204 runtime.goexit /usr/lib/golang/src/runtime/asm_amd64.s:1374 Could not preallocate blank block volume at /dev/cdi-block-volume with size 1Gi kubevirt.io/containerized-data-importer/pkg/image.PreallocateBlankBlock /remote-source/app/pkg/image/qemu.go:297 main.main /remote-source/app/cmd/cdi-importer/importer.go:115 runtime.main /usr/lib/golang/src/runtime/proc.go:204 runtime.goexit /usr/lib/golang/src/runtime/asm_amd64.s:1374 Version-Release number of selected component (if applicable): CNV 4.9.0 How reproducible: 100% Steps to Reproduce: 1. Create a VM and attach a preallocation disk with storageClass OCS 2. Verify the datavolume from CLI 3. Actual results: Importing is failed. Expected results: Import successfully. Additional info: It has no problem if the storageClass is HPP.
Issue is not with OCS but with block volume mode. When 100Mi is used with block - import successfully. When used 500Mi and more - import fail.
Verified. CNV 4.9.1 CDI v1.38 apiVersion: cdi.kubevirt.io/v1beta1 kind: DataVolume metadata: name: vm-blank-dv spec: preallocation: true pvc: accessModes: - ReadWriteMany resources: requests: storage: 1Gi storageClassName: ocs-storagecluster-ceph-rbd volumeMode: Block source: blank: {}
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (OpenShift Virtualization 4.9.1 Images), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:5091