Bug 1762218

Summary: the conversion pod does not start with blockMode PVCs
Product: OpenShift Container Platform Reporter: Tomas Jelinek <tjelinek>
Component: Console Kubevirt PluginAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED NEXTRELEASE QA Contact: Igor Braginsky <ibragins>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: aos-bugs, cnv-qe-bugs, dagur, mlibra, ncredi, piqin, talessio, vlaad
Target Milestone: ---   
Target Release: 4.2.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1762217 Environment:
Last Closed: 2019-12-11 13:57:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1762217    
Bug Blocks:    

Description Tomas Jelinek 2019-10-16 08:51:03 UTC
+++ This bug was initially created as a clone of Bug #1762217 +++

+++ This bug was initially created as a clone of Bug #1756328 +++

How reproducible:
100%

Steps to Reproduce:
1. Have a kubevirt-storage-class-defaults config map which contains "volumeMode: Block" configured for a storage class X
2. Go to the new VM dialog and try to import a VM
3. In the storage section, pick X as a storage class for any or all of the disks
4. Submit the dialog

Actual results:
The conversion pod will never start because it fails to mount the PVCs

Expected results:
The conversion succeeds

Additional info:
The problem is, that if the volume mode is Block, pvc should be mounted using volumeDevices and not volumeMounts

--- Additional comment from Tomáš Golembiovský on 2019-10-10 13:41:59 UTC ---

I have modified entrypoint script to handle the block devices. The change is here:

    https://github.com/oVirt/v2v-conversion-host/commit/cfe8e00f9d6005b6e19aac67be4c50b3d38724fe

It requires corresponding change in the pod definition where the disks should be removed from `volumeMounts` section and included in `volumeDevices` section like this:

      volumeDevices:
        - name: hdd1
          devicePath: /dev/v2v-disk1

The device path is important and must conform to the name /dev/v2v-diskX where X is a number. This is how the entrypoint will find them during execution.

--- Additional comment from Marek Libra on 2019-10-11 12:54:08 UTC ---

UI patch: https://github.com/kubevirt/web-ui-components/pull/557

Configuration of the temporary disk still needs to be resolved, discussion in progress within the PR.