Bug 1953938

Summary: Text of migration concerns in VM selection page does not render line breaks ('\n')
Product: Migration Toolkit for Virtualization Reporter: Maayan Hadasi <mguetta>
Component: GeneralAssignee: Fabien Dupont <fdupont>
Status: CLOSED ERRATA QA Contact: Amos Mastbaum <amastbau>
Severity: medium Docs Contact: Avital Pinnick <apinnick>
Priority: medium    
Version: 2.0.0CC: amastbau, apinnick, fdupont, ibragins, istein, mguetta, vconzola
Target Milestone: ---   
Target Release: 2.0.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: 2021-06-10 17:11:47 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
mini-rhel7⁄mguetta none

Description Maayan Hadasi 2021-04-27 08:55:35 UTC
Created attachment 1775878 [details]
mini-rhel7⁄mguetta

Description of problem:
The validation returns a multiline string, i.e. with "\n", for the concern message in "Select VMs for migration" stage, but the new line is not reflected in UI (attached image)
The UI should reflect it OR the validation service should be changed to return a single line


Version-Release number of selected component (if applicable):
MTV-2.0.0-20 (iib 69034)


How reproducible:
100%


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Fabien Dupont 2021-04-27 09:29:14 UTC
@vconzola do you think multiline concern description would be fine? Or should we ensure that it's single line?

Comment 2 vconzola 2021-04-27 17:22:21 UTC
@fdupont Multi-line descriptions are fine, but looking at the screenshot it appears they're already supported. I don't understand the issue.

Comment 3 Fabien Dupont 2021-05-10 09:40:27 UTC
The issue is that the message provided by the validation service contains "\n\t" and the critical concern should show a list of criteria like below:

Kubernetes only supports names that follow DNS subdomain name as defined in RFC 1123. This means that the name must:
    - contain no more than 64 characters
    - contain only lowercase alphanumeric characters or '-'
    - state with an alphanumeric character
    - end with an alphanumeric character

The new line and tabulation should be respected by the UI.

Comment 4 Avital Pinnick 2021-05-10 11:15:20 UTC
The current error message is rather long. Perhaps the text could be replaced by the VM name description in OCP docs:

"The VM name can contain lowercase letters (a-z), numbers (0-9), and hyphens (-), up to a maximum of 64 characters. The first and last characters must be alphanumeric. The name must not contain uppercase letters, spaces, periods (.), or special characters."

I am not sure we need a reference to RFC 1123. Replacing the list with sentences would solve the problem of the non-rendering '\n\t'.

Comment 5 Igor Braginsky 2021-05-10 11:47:24 UTC
I guess it is OK to reference RFC 1123, but also it is OK to put everything in one long sentence to avoid making list with `\n` for new lines

Comment 6 Fabien Dupont 2021-05-11 07:31:04 UTC
I've created this pull request: https://github.com/konveyor/forklift-validation/pull/24. Would you mind reviewing?

Comment 7 Avital Pinnick 2021-05-11 09:29:22 UTC
(In reply to Fabien Dupont from comment #6)
> I've created this pull request:
> https://github.com/konveyor/forklift-validation/pull/24. Would you mind
> reviewing?

I am not sure who you wanted to review the text because there was no need_info set. 

I left a comment on the PR suggesting the following text:

"assessment": "The VM name must comply with the DNS subdomain name format defined in RFC 1123. The name can contain lowercase letters (a-z), numbers (0-9), and hyphens (-), up to a maximum of 64 characters. The first and last characters must be alphanumeric. The name must not contain uppercase letters, spaces, periods (.), or special characters."

Comment 8 Amos Mastbaum 2021-05-18 10:20:37 UTC
build 2.0.0-15 / iib:75270

Comment 11 errata-xmlrpc 2021-06-10 17:11:47 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 (MTV 2.0.0 images), 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-2021:2381