Bug 1803131 - Wizard validation displays error for incorrect dropdown item in some situations
Summary: Wizard validation displays error for incorrect dropdown item in some situations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.4
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 4.4.0
Assignee: Ido Rosenzwig
QA Contact: Nelly Credi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-14 14:41 UTC by Radim Hrazdil
Modified: 2020-05-04 11:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-04 11:36:59 UTC
Target Upstream Version:


Attachments (Terms of Use)
video sample (766.28 KB, application/x-matroska)
2020-02-14 14:41 UTC, Radim Hrazdil
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:37:27 UTC

Description Radim Hrazdil 2020-02-14 14:41:39 UTC
Created attachment 1663133 [details]
video sample

Description of problem:

Consider user having the following common template validations:
validations: |
      [
        {
          "name": "minimal-required-memory",
          "path": "jsonpath::.spec.domain.resources.requests.memory",
          "rule": "integer",
          "message": "This VM requires more memory.",
          "min": 5368709120
        }, {
          "name": "windows-virtio-bus",
          "path": "jsonpath::.spec.domain.devices.disks[*].disk.bus",
          "rule": "enum",
          "message": "virto disk bus type has better performance, install virtio drivers in VM and change bus type",
          "values": ["scsi"],
          "justWarning": true
        }, {
          "name": "windows-disk-bus",
          "path": "jsonpath::.spec.domain.devices.disks[*].disk.bus",
          "rule": "enum",
          "message": "disk bus has to be either virtio or sata",
          "values": ["scsi", "sata"]
        }
      ]


When user proceeds to the Storage section in Wizard and edits the rootdisk disk, the selected disk interface is incorrectly marked as Invalid.

After switching to different interface and then back, the issue disappears.
See the attached video 

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

How reproducible:
100%

Steps to Reproduce:
See the video for exact steps


Additional info:

Comment 1 Guohua Ouyang 2020-03-13 03:23:42 UTC
By default, the template validations are:

validations: |
      [
        {
          "name": "minimal-required-memory",
          "path": "jsonpath::.spec.domain.resources.requests.memory",
          "rule": "integer",
          "message": "This VM requires more memory.",
          "min": 536870912
        }, {
          "name": "windows-virtio-bus",
          "path": "jsonpath::.spec.domain.devices.disks[*].disk.bus",
          "rule": "enum",
          "message": "virto disk bus type has better performance, install virtio drivers in VM and change bus type",
          "values": ["virtio"],
          "justWarning": true
        }, {
          "name": "windows-disk-bus",
          "path": "jsonpath::.spec.domain.devices.disks[*].disk.bus",
          "rule": "enum",
          "message": "disk bus has to be either virtio or sata",
          "values": ["virtio", "sata"]
        }
      ]

Change the values like the bug description and use it to create vm, there is no invalid message shows.

In a few minutes, the changes to the validation will be cleared, the values are: ["virtio", "sata"]. If user are still on the wizard which isn't closed yet, on storage tab, the disk interface is still "scsi" even the validations just have "VirtIO" and "sata", edit the disk can see the invalid messages. If close the wizard and re-open it, no problem at all.

Based on the tests, move the bug to be verified.

Comment 4 errata-xmlrpc 2020-05-04 11:36:59 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.