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

Bug 1900266

Summary: Default parameters for VM Creation in the UI create non-live migratable VMs.
Product: OpenShift Container Platform Reporter: Clark Hale <chale>
Component: Console Kubevirt PluginAssignee: Yaacov Zamir <yzamir>
Status: CLOSED WORKSFORME QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: alitke, aos-bugs, cnv-qe-bugs, fdeutsch, gouyang, tjelinek, tnisan, ycui
Target Milestone: ---   
Target Release: 4.8.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-05-10 11:41:16 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
Screen Shot of UI none

Description Clark Hale 2020-11-21 20:06:37 UTC
Created attachment 1731890 [details]
Screen Shot of UI

Description of problem:

This is a "user experience" thing.  By defaults, if a user creates a VM from the Wizard, the default options for storage are RWO and "Filesystem".  VMs with disks attached of this type cannot be live-migrated between nodes. 

There is no clear indication in the UI that these settings will cause this and for administrators comparing this to RHV...this behavior is surprising.

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

How reproducible:
Every time.

Steps to Reproduce:
1.  Install OCP + OCS + CNV
2.  Create VM
3.  Attempt to live migrate VM

Actual results:
VM Fails to live migrate because defaults are RWO and Volume Type Filesystem.

Expected results:
Defaults are sets so that VMs can be live migrated.

Additional info:

Comment 1 Fabian Deutsch 2020-11-26 09:58:17 UTC
The defaults are read from a config map, see: https://docs.openshift.com/container-platform/4.5/virt/virtual_machines/virtual_disks/virt-storage-defaults-for-datavolumes.html

@tjelinek @alitke might have an idea as well.

Comment 2 Tomas Jelinek 2020-11-26 10:15:55 UTC
Correct, IIRC the reason why is the default RWO / Filesystem is that there is a larger set of storages where this works.

@Clark: if you change the config map from Comment1, does it work for you?

Comment 3 Fabian Deutsch 2020-11-26 10:40:12 UTC
@tjelinek are you saying that RWO is the default if no storage class is provided in the config map?

Then I'd say by now we should consider this a bug.
For OCP Virtualization to work as expected, then we must at least default to RWX. WDYT?

Comment 4 Tomas Jelinek 2020-11-26 11:29:54 UTC
(In reply to Fabian Deutsch from comment #3)
> @tjelinek are you saying that RWO is the default if no storage
> class is provided in the config map?

ya, it is the default behaviour:
https://github.com/kubevirt/hyperconverged-cluster-operator/blob/master/pkg/controller/operands/cdi.go#L271

> 
> Then I'd say by now we should consider this a bug.
> For OCP Virtualization to work as expected, then we must at least default to
> RWX. WDYT?

I vaguely remember that we had this discussion some time ago and RWO/FS won.
@Adam Litke WDYT? Is it time to change it now?

Comment 5 Clark Hale 2020-11-30 15:42:25 UTC
> The defaults are read from a config map, see: https://docs.openshift.com/container-platform/4.5/virt/virtual_machines/virtual_disks/virt-storage-defaults-for-datavolumes.html

Thanks Fabian.  This link is what I should do...I'll try it.

Thinking on this, if changing the defaults are not possible or not advisable, then the following might be worth pursuing:

1.  There's not a clear indication in the docs that this HAS to be done, and I could see a user missing this like I did.  It may be worth while to have a "Next Steps" section in the "OpenShift Virtualization Installation" that includes a link to this page for post-operator installation configuration.  (I've already suggested this in a different BZ 1900273)

2.  In the UI, it might be valuable to have a warning displayed when a non-live migrate-able disk configuration is chosen.  Finding that out AFTER VM creation is too late.  A warning would ensure the user knows about it before hand, rather than finding out when they try to live migrate.

Comment 6 Fabian Deutsch 2020-12-02 15:55:32 UTC
Especially on 2 - yes, I totally agree. https://issues.redhat.com/browse/CNV-8626 is about addressing this point, leveraging the information we gain, and displaying it in the ui.

Comment 7 Ying Cui 2020-12-23 13:49:43 UTC
We will keep this bug in CNV product, and after the issue https://issues.redhat.com/browse/CNV-8626 is fixed, then we will check UI again.

Comment 8 Adam Litke 2021-01-04 19:52:20 UTC
@tjelinek Is there anything we can do in the UI for 2.6 at this point?  I'd like to see what our options are at this stage. I think the best option is to update the OCP Virtualization docs to make this clearer.  In 2.7 we will deliver lower level functionality to choose the best settings based on the detected provisioner (CNV-8626) but I don't expect the UI to integrate with this until at least 2.8.

Comment 9 Tomas Jelinek 2021-01-05 07:54:32 UTC
I dont think we can do much in the UI without a proper backend support here. We might add a warning to the "Review and create" screen if you choose a RWO on any disk and send the user to the documentation explaining how to change the defaults. But is that check good enough? Or will it only catch a small subset of the cases?

Comment 10 Adam Litke 2021-01-05 13:18:55 UTC
Tomas, I think this would be good for usability.  There are other cases (outside of storage) that can cause a VM to lose live-migration capability.  Maybe consider a design that allows multiple warnings to be displayed on the "Review and create" screen.

Comment 11 Adam Litke 2021-01-05 13:21:03 UTC
Tomas, would you like to take this bug on the UI side?

Comment 12 Guohua Ouyang 2021-01-05 13:31:57 UTC
There are more problems caused by defaults StorageClass/AccessMode/VolumeMode on different page, like
https://bugzilla.redhat.com/show_bug.cgi?id=1911787
https://bugzilla.redhat.com/show_bug.cgi?id=1908180

Currently, UI has enhance the SC 'ocs-storagecluster-ceph-rbd', when it's selected, AccessMod is pre-selected to RWX and VolumeMode is pre-selected to Block.
If user don't select the SC 'ocs-storagecluster-ceph-rbd', many workflow is broken.

Comment 13 Tal Nisan 2021-05-10 11:41:16 UTC
The behavior changed and RWO is no longer the default option