Bug 1850569

Summary: [v2v][UI]VM import from RHV: "Connection successful. Loading data" displayed when wrong RHV details provided
Product: OpenShift Container Platform Reporter: Yaacov Zamir <yzamir>
Component: Console Kubevirt PluginAssignee: Phillip Bailey <phbailey>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: aos-bugs, cnv-qe-bugs, fkrepins, gouyang, istein, mguetta, phbailey, pkliczew, tjelinek
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1850221 Environment:
Last Closed: 2020-10-27 16:08:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1850221    
Bug Blocks:    
Attachments:
Description Flags
connection successful message for bad user name error none

Description Yaacov Zamir 2020-06-24 13:47:16 UTC
+++ This bug was initially created as a clone of Bug #1850221 +++

Description of problem:
In UI, VM import wizard:

When entering some random text to RHV URL, ca certificate, user, password,
Clicking check & save button 
Displays in the bottom of the wizard window:
 "Connection successful. Loading data" 
and then it is replaced with this message:
"Connection succeeded but could not read list of virtual machines from the RHV API instance"

This message is misleading, since the connection could not succeed with just random letters provided as RHV connection details. 

Version-Release number of selected component (if applicable):
CNV-2.4
vm-import-operator: quay.io/kubevirt/vm-import-operator:v0.0.3
vm-import-controller: quay.io/kubevirt/vm-import-controller:v0.0.3

Expected results:
There should be a message saying connection to RHV failed.

--- Additional comment from Piotr Kliczewski on 2020-06-24 07:04:20 UTC ---

Based on code errors provided by ovirtsdk we are unable to distinguish whether we failed due to incorrect url, credentials or cert.
We need to come up with generic connection failure message.

--- Additional comment from Filip Krepinsky on 2020-06-24 09:58:23 UTC ---

The UI is just using the CR statuses which says LoadingVmsListFailed. Not sure we can do much about it there.

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

Comment 2 Tomas Jelinek 2020-07-10 06:55:10 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 Piotr Kliczewski 2020-08-13 11:26:39 UTC
I do not see this confusing message in the backend. I think we should only show "Loading data" which would end up as "Failed to load data"

Comment 5 Filip Krepinsky 2020-08-13 11:42:04 UTC
ok, let's make the LoadingVmsListFailed status more generic so it will have the same meaning as Failed status

Comment 6 Phillip Bailey 2020-09-02 00:50:00 UTC
I am unable to reproduce this bug. Yaacov, could you please try to reproduce and let me know if you are able to do so?

Comment 7 Yaacov Zamir 2020-09-02 07:44:46 UTC
well, some of this bug's symptoms are gone :-)

but not all, we still get the string "Connection succeeded" even if connection did not succeeded,
the fixes in other bugs that fixes part of this problem didn't solve the root cause of this,
witch is the UI assuming the connection was successful, when it should just report the message it's getting form the backend.

to see this behaviour:
a. start the  vm-import
b. fill in correct logging in information for a rhev instance
c. change the user name to a none valid user

check connection, the connection should fail because the user name is not valid, but the message we get is saying "Connection successful"

Comment 8 Yaacov Zamir 2020-09-02 07:45:37 UTC
Created attachment 1713409 [details]
connection successful message for bad user name error

Comment 9 Tomas Jelinek 2020-09-24 06:43:20 UTC
moving out until there is a lgtm on the patch

Comment 10 Ilanit Stein 2020-10-08 11:07:19 UTC
Verified on 
OpenShift Version
4.6.0-fc.9
Kubernetes Version
v1.19.0+1fc699e

Now the message is different:
“Connection failed. Please check your credentials and ensure that the API you're attempting to connect to is operational.”

Comment 13 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