Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1911382

Summary: "source volumeMode (Block) and target volumeMode (Filesystem) do not match" shows in VM Error
Product: OpenShift Container Platform Reporter: Guohua Ouyang <gouyang>
Component: Console Kubevirt PluginAssignee: Matan Schatzman <mschatzm>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.7CC: aos-bugs, gouyang, mschatzm, ycui, yzamir
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:49:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
"source volumeMode (Block) and target volumeMode (Filesystem) do not match" none

Description Guohua Ouyang 2020-12-29 02:47:31 UTC
Created attachment 1742845 [details]
"source volumeMode (Block) and target volumeMode (Filesystem) do not match"

Description of problem:
"source volumeMode (Block) and target volumeMode (Filesystem) do not match" shows in VM Error when creating a vm in customize mode by selecting a source available template.

The customize wizard should detect and use the source dv's SC/AccessMode/VolumeMode.

Version-Release number of selected component (if applicable):
ocp 4.7

How reproducible:
100%

Steps to Reproduce:
1. upload image to rhel8 template via 
$ virtctl image-upload dv rhel8 --size=10Gi --image-path=./cirros.img --storage-class=ocs-storagecluster-ceph-rbd --volume-mode=Block --access-mode=ReadWriteMany --insecure -n openshift-virtualization-os-images
2. select rhel8 template in wizard
3. click "Customize" 
4. create the vm with defaults in customize mode

Actual results:
VM error with "source volumeMode (Block) and target volumeMode (Filesystem) do not match"

Expected results:
VM is created successfully.

Additional info:

Comment 1 Yaacov Zamir 2020-12-30 07:47:23 UTC
Note:
When fixing this bug look at this other bugs related to storage not using data available in the template to create storage in VM:

https://bugzilla.redhat.com/show_bug.cgi?id=1911382 - source volumeMode (Block) and target volumeMode (Filesystem) do not match" shows in VM Error
https://bugzilla.redhat.com/show_bug.cgi?id=1895169 - VM Template does not properly manage Mount Windows guest tools check box during VM creation (assigned Philip)
https://bugzilla.redhat.com/show_bug.cgi?id=1911418 -  The target storage class name is not displayed if default storage class is used (assigned Gilad)

Comment 3 Yaacov Zamir 2020-12-30 13:55:50 UTC
This issue is related to the "Golden Image" feature that is a customer request.
Using the golden image flow correctly may result in a VM creation fail.

Setting to blocker +

Comment 4 Matan Schatzman 2021-01-04 13:48:30 UTC
We had a discussion today about this bug with @rawagner , @yzamir , @mcarleto :

We have decided that the solution is:

1. using the volumeMode provided by source PVC.
2. disabling the dropdown option for the user to edit the volumeMode.
3. showing a small info message that the volumeMode is taken from the source PVC.

Comment 10 errata-xmlrpc 2021-02-24 15:49:10 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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/RHSA-2020:5633