Bug 1983743

Summary: [RFE] Improve RHV missing attributes when building RHV VMs inventory
Product: Migration Toolkit for Virtualization Reporter: Ilanit Stein <istein>
Component: InventoryAssignee: Jeff Ortel <jortel>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 2.1.0CC: fdupont, jortel
Target Milestone: ---Keywords: FutureFeature
Target Release: 2.3.0Flags: istein: needinfo+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-04-04 18:03:40 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 2021-07-19 16:05:50 UTC
Description of problem:
We had those bugs [1], reporting a failure to build the RHV inventory.
This error is displayed in UI, after picking a RHV provider:
  "Error loading VMs 500: Internal server error".
This error doesn't imply on the cause or how it can be fixed.
The provider VMs list is not loaded and there is an endless rotating wheel. 
This basically blocks Migration plan creation.

The mentioned bugs fixed only the specific cause, by making the missing obligatory attribute into an optional one.

Please
1. Try to be more tolerant for missing attributes not to fail all the RHV tree - need to check for the number of optional RHV attributes
2. Enhance visibility by adding a exact reason for failing the connection. In the logs and if possible expose it in UI.

[1] 
1. Bug 1979652 - Error loading RHV data in MTV migration UI
Error: "Error loading VMs 500: Internal server error"
Cause: Empty vNIC profile.
How to find the actual cause: Need to check controller log, see SQL error on vNIC profile, and goto the RHV provider, and look for a network that doesn't have a vNIC profile.

2. No BZ for this -  
Error: "Error loading VMs 500: Internal server error"
Cause: Empty disk profile (VM with no disk).
How to find the actual cause: Need to check controller log, see SQL error on Disk profile, and goto the RHV provider, and look for a network that doesn't have a vNIC profile.

Version-Release number of selected component (if applicable):
MTV-2.1

Comment 1 Fabien Dupont 2021-10-12 11:41:20 UTC
@jortel, has this type of resilience been implemented in MTV 2.2.0 ? If no, do you think you can make it ?

Comment 2 Fabien Dupont 2021-11-08 11:20:34 UTC
Not a blocker for MTV 2.2.0. Changing target release to 2.3.0.

Comment 3 Jeff Ortel 2022-01-27 14:32:39 UTC
In 2.3, the RHV REST resources have discontinued including nested (referenced) resources. As a result, I believe this issue has been resolved.

Comment 4 Ilanit Stein 2022-03-10 16:38:53 UTC
Jeff,
Could you please explain a little more on this change and how it solves the problem.
Is there a way to verify this bug?

Comment 5 Ilanit Stein 2022-03-21 16:12:23 UTC
From what I understand from Jeff Ortel:

In MTV-2.2 the error happened when building the tree with broken data.
In MTV-2.3 the data model is different and the tree is built differently so it does not fail.  

In addition, such error was not faced during the MTV-2.3 QE pre release testing.

Based on the above moving this bug to VERIFIED.

Comment 8 errata-xmlrpc 2022-04-04 18:03:40 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.3.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-2022:1183