Bug 1850562 - [v2v][ui] VM import RHV to CNV: RHV URL pass validation though it is missing 'https://'
Summary: [v2v][ui] VM import RHV to CNV: RHV URL pass validation though it is missing ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.0
Assignee: Gilad Lekner
QA Contact: Maayan Hadasi
URL:
Whiteboard:
: 1849733 1868737 (view as bug list)
Depends On: 1849733
Blocks: 1874373
TreeView+ depends on / blocked
 
Reported: 2020-06-24 13:41 UTC by Yaacov Zamir
Modified: 2021-01-02 19:27 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1849733
: 1874373 (view as bug list)
Environment:
Last Closed: 2020-10-27 16:08:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 6290 0 None closed Bug 1850562: RHV URL validation is missing https:// 2021-01-02 19:26:04 UTC
Github openshift console pull 6721 0 None closed Bug 1850562: RHV URL pass validation though it is missing https:// 2021-01-02 19:25:30 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:09:16 UTC

Description Yaacov Zamir 2020-06-24 13:41:08 UTC
+++ This bug was initially created as a clone of Bug #1849733 +++

Description of problem:
When RHV URL is missing the 'https://' prefix,
and provide all other RHV details correctly (ca cert, user, password)
We get this message:
 "Connection succeeded but could not read list of virtual machines from the RHV API instance"
That prevents from loading the VMs in this RHV.

This should not happen, and user should be notified that the RHV URL is not valid.

We can do the following to solve this:

1. Add help message with example of a RHV URL - It can save users confusion
2. We can fail RHV URL on validation error 

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

--- Additional comment from Filip Krepinsky on 2020-06-23 14:25:17 UTC ---

we can add the validation to the UI, but what protocols/ports should be allowed then? 

just https://hostname or hostname:443? What about http, 8443 or any other ports?

Would it make sense to default to http or https on backend?

--- Additional comment from Piotr Kliczewski on 2020-06-23 14:36:37 UTC ---

We need https for importing the disks. As far as I know we can use either default https port (443) or 8443. I haven't seen any other port supported.

Comment 1 Yaacov Zamir 2020-06-24 14:00:59 UTC
*** Bug 1849733 has been marked as a duplicate of this bug. ***

Comment 2 Tomas Jelinek 2020-07-10 06:54:21 UTC
There has been a big batch of v2v related bugs moved to kubevirt plugin at once. We are working on them but due to capacity this did not make it last sprint.

Comment 4 Filip Krepinsky 2020-08-10 16:43:05 UTC
we could also include https:// as a default value of the url

Comment 8 Ilanit Stein 2020-08-13 15:53:40 UTC
@Piotr, @Tomas,

Can this bug get cloned to 4.5.z please?
It looks very important to me as I see, that EACH person in my team and externally, that ran it for the first time failed on this.

We'll file a bug to improve the tool tip or the "API URL" to guide exactly what content should be added here.
Current tool tip only links to some site that show RHv details, but do not explain the expected content.

Comment 9 Maayan Hadasi 2020-08-13 16:27:31 UTC
(In reply to Ilanit Stein from comment #8)
> @Piotr, @Tomas,
> 
> Can this bug get cloned to 4.5.z please?
> It looks very important to me as I see, that EACH person in my team and
> externally, that ran it for the first time failed on this.
> 
> We'll file a bug to improve the tool tip or the "API URL" to guide exactly
> what content should be added here.
> Current tool tip only links to some site that show RHv details, but do not
> explain the expected content.

Opened new bug: Bug 1868737 - [UI][V2V][RHV to CNV VM import] Improve "API URL" structure info while connecting to new RHV instance

Comment 10 Piotr Kliczewski 2020-08-16 20:22:27 UTC
Ilanit, I am not sure whether this bug is critical enough. I will let Tomas handle the backport if he see it needed.

Comment 11 Yaacov Zamir 2020-08-18 11:42:37 UTC
*** Bug 1868737 has been marked as a duplicate of this bug. ***

Comment 12 Maayan Hadasi 2020-09-22 11:52:56 UTC
Verified this issue with OCP 4.6/CNV 2.5

I provided RHV API URL without 'https://', all other provider details were correct -> An instruction under 'API URL' field is shown: "URL should start with 'https://'" but the connection succeeded and I was able to select VM to import. The followed import fails on:

ValidationFailed: Failed to initialize the source provider (Failed to connect to source provider): Post /ovirt-engine/sso/oauth/token: unsupported protocol scheme ""


@Gilad, @Ilanit, is this the expected behavior?
Shouldn't the connection fail on validation?

Comment 13 Ilanit Stein 2020-09-22 17:00:41 UTC
@Maayan, 
The described behavior is different than the one reported in the bug description.
The VMs were not listed, when RHV URL did not start with "https://".

So now not only that RHV passes validation, it even allows to continue further and perform the VM import.

Comment 14 Maayan Hadasi 2020-09-23 07:58:49 UTC
Moving this issue back to ASSIGNED.
The expected behavior is: connecting to RHV provider should fail on validation and not as described in comment #12

Comment 16 Maayan Hadasi 2020-09-29 10:28:23 UTC
Verified as fixed

Versions:
OCP 4.6.0-fc.8
CNV 2.5.0

There is an error message under RHV API URL field in case it does not start properly with 'https':
"URL has to start with 'https://'"

'Check and Save' button is disabled

Comment 18 errata-xmlrpc 2020-10-27 16:08:51 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 (OpenShift Container Platform 4.6 GA 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/RHBA-2020:4196

Comment 19 Gilad Lekner 2021-01-02 19:27:22 UTC
Clearing redundant NEEDINFO


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