Uploaded image for project: 'OpenShift Virtualization'
  1. OpenShift Virtualization
  2. CNV-31504

cdi import fails in ocp 4.14 for block mode pvcs

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      CDI is unable to perform a disk import into a block pvc (filesystem pvcs still import fine) in the current ocp 4.14. This issue began in the ocp 4.14 nightly on July 28th. The hypershift/kubevirt periodics caught this issue first, and then it blocked the hypershift repo from being able to merged due to the hypershift/kubevirt periodic failing.

       

      Below is an example of the log message from the failing cdi importer pod.
      I0728 06:21:38.998213 1 importer.go:103] Starting importer
      E0728 06:21:38.999132 1 importer.go:133] exit status 1, blockdev: cannot open /dev/cdi-block-volume: Permission denied

      kubevirt.io/containerized-data-importer/pkg/util.GetAvailableSpaceBlock
      /remote-source/app/pkg/util/util.go:136
      kubevirt.io/containerized-data-importer/pkg/util.GetAvailableSpaceByVolumeMode
      /remote-source/app/pkg/util/util.go:106
      main.main
      /remote-source/app/cmd/cdi-importer/importer.go:131
      runtime.main
      /usr/lib/golang/src/runtime/proc.go:250
      runtime.goexit
      /usr/lib/golang/src/runtime/asm_amd64.s:1598
       

      Note that this is not dependent on anything to do with Hypershift. It was merely the hypershift tests that caught this. This issue can be easily reproduced using the VM yaml below.

       

      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
        labels:
          kubevirt.io/vm: vm-alpine-datavolume
        name: vm-alpine-datavolume
      spec:
        dataVolumeTemplates:
        - metadata:
            creationTimestamp: null
            name: alpine-dv
          spec:
            storage:
              resources:
                requests:
                  storage: 2Gi
              volumeMode: Block
            source:
              registry:
                url: docker://quay.io/kubevirt/alpine-container-disk-demo:devel
                pullMethod: node
        running: true
        template:
          metadata:
            labels:
              kubevirt.io/vm: vm-alpine-datavolume
          spec:
            domain:
              devices:
                disks:
                - disk:
                    bus: virtio
                  name: datavolumedisk1
              resources:
                requests:
                  memory: 128Mi
            terminationGracePeriodSeconds: 0
            volumes:
            - dataVolume:
                name: alpine-dv
              name: datavolumedisk1

       

      This can be reproduced with the following environment

      • Any OCP 4.14 nightly starting July 28th.
      • CNV 4.14 pre-release
      • Any storageclass capable of block mode

              alitke@redhat.com Adam Litke
              rhn-engineering-dvossel David Vossel (Inactive)
              Jenia Peimer Jenia Peimer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: