Bug 1796388 - Disk Validations should support optional validation also
Summary: Disk Validations should support optional validation also
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 4.4.0
Assignee: Ido Rosenzwig
QA Contact: Nelly Credi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-30 10:23 UTC by Ido Rosenzwig
Modified: 2020-05-13 21:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-13 21:55:38 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift console pull 4105 None closed Bug 1796388: Support 'justWarning' validation for DiskBus validations 2020-03-05 10:09:59 UTC
Red Hat Product Errata RHBA-2020:0581 None None None 2020-05-13 21:55:39 UTC

Description Ido Rosenzwig 2020-01-30 10:23:20 UTC
Description of problem:
Currently, the console enforces only restrictive disk type validations while it should also enforce optional validations (validations which has the 'justWarning' key).
As the console shows an error message for the restrictive validations, it should show a warning message if the user chose not recommended disk type.


How reproducible:
100%

Steps to Reproduce:
1. Check that you have an optional disk validation in a template at the openshift namespace.
optional disk validation can be found in any of the windows templates:
$ oc get templates -n openshift | grep win

2. Pick one of the results ( for example win2k12r2-server-large-v0.7.0)
3. Make sure the template has a validation object with 'justWarning key' :
$ oc get template win2k12r2-server-large-v0.7.0 -n openshift -o yaml

4. Open openshift web console : Go to the 'workloads' -> 'Virtual Machines' -> 'Create Virtual Machine'
5. Choose a Windows OS and a source of 'container' or 'URL', the other fields aren't important. ( Don't use a user template )
6. Go to the Storage Tab 
7. Edit the disk that is present there: you should have 2 options: VirtIO and scsi.

Expected results:

- scsi should be marked as 'not recommended' but can be chosen.
- If scsi was chosen a warning message should appear under the Dropdown in the modal.
- If the user saved the changes at the modal along with the scsi choice, a warning message should appear below the scsi label in the Interface column.

Additional info:

NOTE: this bug is not for windows templates, virtIO and scsi specific but a general one. I used those specific names to explain the problem as this is the only way to reproduce the bug without creating a user template with custom validations.
Thus, the fix should be general and not Windows,VirtIO and scsi specific.

Comment 2 Ido Rosenzwig 2020-02-11 09:41:01 UTC
> 7. Edit the disk that is present there: you should have 2 options: VirtIO
> and scsi.
> 
> Expected results:
> 
> - scsi should be marked as 'not recommended' but can be chosen.
> - If scsi was chosen a warning message should appear under the Dropdown in
> the modal.
> - If the user saved the changes at the modal along with the scsi choice, a
> warning message should appear below the scsi label in the Interface column.
> 
> Additional info:
> 
> NOTE: this bug is not for windows templates, virtIO and scsi specific but a
> general one. I used those specific names to explain the problem as this is
> the only way to reproduce the bug without creating a user template with
> custom validations.
> Thus, the fix should be general and not Windows,VirtIO and scsi specific.

I confused with `scsi` and `sata` - I meant to write `sata`.
wherever it's written `scsi` think of it as `sata`. Sorry for the confusion.

Comment 3 Guohua Ouyang 2020-02-24 02:51:33 UTC
The bug says it should be general and not Windows.
If it's windows, the disk type are virtio and sata, select sata warning shows.
If it's cirros/fedora, the disk type are virtio, sata and scsi, select sata/scsi no warning shows, is it correct?

version: 4.4.0-0.nightly-2020-02-22-102956

Comment 4 Ido Rosenzwig 2020-02-24 07:08:45 UTC
Yes that is correct.

Please note that disk validations are present only for Windows templates in the common-templates provided by Kubevirt because only Windows has limitations. This is why you see the warnings only when choosing a Windows OS.

If you would like to verify the errors appear on OSs that aren't windows you can change a common-template temporarily by coping the validations from windows template to a non-windows template. (and remove those changes after you done).

In addition, please verify the warnings are present on user templates as well:
1. Create a user template
2. Add Disk validations manually for the template you just created ( coping from windows template is the fastest )
3. Create a VM from the template you created.

Comment 5 Guohua Ouyang 2020-02-24 07:35:02 UTC
Thanks for the confirmation.

Verified it on vm template wizard, the warning present as well.

Comment 7 errata-xmlrpc 2020-05-13 21:55:38 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, 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/RHBA-2020:0581


Note You need to log in before you can comment on or make changes to this bug.