Bug 2181323

Summary: InstanceType label missing in DataSource/bootable volume if Size not chosen in Add modal
Product: Container Native Virtualization (CNV) Reporter: Hilda Stastna <hstastna>
Component: User ExperienceAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.13.0CC: gouyang
Target Milestone: ---   
Target Release: 4.14.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: 2023-11-08 14:05:06 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
size not set while being able to click on Save none

Description Hilda Stastna 2023-03-23 17:11:59 UTC
Created attachment 1953205 [details]
size not set while being able to click on Save

Description of problem:
When adding volume in 'Add volume to boot from' modal and selecting InstanceType while forgetting choosing also size (and being able to click on Save anyway), the appropriate label is not set at all, simply ignored, without letting the user know what's going on.

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

How reproducible:
always

Steps to Reproduce:
1. Go to Catalog > InstanceTypes tab, or to Bootable volumes list
2. Click on Add volume button
3. Fill in the required fields,
   then also select optional 'Default InstanceType' from the drop down,
   forget to choose also 'Size'
4. Click on 'Save' button
5. Check the volume's/DataSource's yaml or its Details page, check the labels

Actual results:
'instancetype.kubevirt.io/default-instancetype' is totally missing in the DataSource resource, even when user selected some from 'Default InstanceType' drop down. User has no idea why, what's going on, no idea about the need of choosing also Size when choosing some InstanceType (that is optional for now, btw, when adding new bootable volume). 

Expected results:
Some default size (or simply the 1st from the drop down) should be automatically selected once the user chooses 'Default InstanceType' in the modal, so  then the InstanceType could be properly set when saving the data. Or some other scenario, other than the actual one. For example, user could be somehow forced to set also the size, if ever choosing some InstanceType. Save button could be disabled till the user chooses also the size, but the user should be informed what is missing.

Additional info:
In Bootable volumes list in Edit modal, there are the same fields available for editing (Default InstanceType, Preference, Description) but the problem IS NOT reproducible there, because it was implemented the way that once the user chooses some InstanceType, the 1st option from sizes is selected by default, too, and the user can change that if they want, of course.
According to mentioned above and for consistency reasons, I'd suggest implementing the same behavior also in Add volume to boot from modal for InstanceType field/drop down. Another benefit of doing so is that we can save some unnecessary clicks for the user, in case the user would be satisfied with the 1st option from available sizes, instead of forcing the user to explicitly choose some size.

Comment 1 Guohua Ouyang 2023-04-28 07:03:52 UTC
verified on kubevirt-console-plugin-rhel9-container-v4.14.0-1047, the size is selected automatically when a "Default InstanceType" is selected

Comment 4 errata-xmlrpc 2023-11-08 14:05:06 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 (Important: OpenShift Virtualization 4.14.0 Images security and bug fix 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-2023:6817