Bug 2017613 - Import preallocation blank block disk is failed with big enough sizes
Summary: Import preallocation blank block disk is failed with big enough sizes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Storage
Version: 4.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.1
Assignee: skagan
QA Contact: dalia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-27 01:48 UTC by Guohua Ouyang
Modified: 2025-04-04 13:23 UTC (History)
5 users (show)

Fixed In Version: CNV v4.9.1-6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-13 19:59:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt containerized-data-importer pull 2005 0 None Merged Fix blank block preallocation import 2021-11-03 15:02:24 UTC
Github kubevirt containerized-data-importer pull 2007 0 None Merged [release-v1.38] Fix blank block preallocation import 2021-12-10 13:00:56 UTC
Red Hat Product Errata RHBA-2021:5091 0 None None None 2021-12-13 19:59:15 UTC

Description Guohua Ouyang 2021-10-27 01:48:10 UTC
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.

Comment 1 dalia 2021-10-27 08:58:49 UTC
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.

Comment 2 dalia 2021-11-16 11:51:46 UTC
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: {}

Comment 8 errata-xmlrpc 2021-12-13 19:59:01 UTC
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


Note You need to log in before you can comment on or make changes to this bug.