Bug 1803131

Summary: Wizard validation displays error for incorrect dropdown item in some situations
Product: OpenShift Container Platform Reporter: Radim Hrazdil <rhrazdil>
Component: Console Kubevirt PluginAssignee: Ido Rosenzwig <irosenzw>
Status: CLOSED ERRATA QA Contact: Nelly Credi <ncredi>
Severity: low Docs Contact:
Priority: low    
Version: 4.4CC: aos-bugs, fkrepins, gouyang, irosenzw
Target Milestone: ---   
Target Release: 4.4.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: 2020-05-04 11:36:59 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
video sample none

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