Bug 1710901

Summary: [v2v][UI] VM Name\Disk Name validation error do provide details on ALL the compatibility problems
Product: OpenShift Container Platform Reporter: Ilanit Stein <istein>
Component: Console Kubevirt PluginAssignee: Filip Krepinsky <fkrepins>
Status: CLOSED ERRATA QA Contact: Maayan Hadasi <mguetta>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: aos-bugs, bthurber, cnv-qe-bugs, fkrepins, mguetta, ncredi, tjelinek
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.2.0-0.nightly-2019-08-15-073735 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-30 16:27:11 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:

Description Ilanit Stein 2019-05-16 14:28:38 UTC
Description of problem:
In UI, create VM dialog, Provision source: Import, 
VM Name validation error is reported only on the first issue found.
For example, for VM name: "Igor_vm",
It will display that upper case is not allowed,
and only after we turn the upper case to lower case,
It will display error on that under score is not allowed.

Same goes for the Disk name, that follow same limitations.

Version-Release number of selected component (if applicable):
hco tag: v.2.0.0-12

Expected results:
Option #1
Validation error for VM Name, and Disk name should be fully informative.
It can be something like:
"Only Lower case alphanumeric characters, ‘.’ or '-', start and end with an alphanumeric character", maximum length: 253 characters is supported"

Option #2
Run full validation on the typed name, to identify all compatibility problems, and report it from the first place, and not in stages, as it is done today.

For example, for VM name: "Igor_vm",
provide validation error:
"Upper case and underscore is not allowed."

I prefer Option #1, since it provides user full info on what is supported.

Comment 1 Filip Krepinsky 2019-05-21 10:13:39 UTC
Option #1

This can be a bit overwhelming to know what is wrong.

Option #2

This is a better approach IMO

Comment 3 Brett Thurber 2019-10-21 19:03:02 UTC
Moving to ON_QA for 2.1.1.

Comment 4 Maayan Hadasi 2019-12-11 10:22:14 UTC
Verified as fixed in version: CNV 2.2.0-10

VM name validation errors are reported in a detailed message, in case of more than one invalid character (e.g. uppercase, underscore, whitespace) and invalid name format (e.g. Name has to end with alphanumeric character)

Same for disk name validation.

Comment 6 errata-xmlrpc 2020-01-30 16:27:11 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/RHEA-2020:0307