Bug 1921119

Summary: RHV reports unsynced cluster when host QoS is in use.
Product: Red Hat Enterprise Virtualization Manager Reporter: Roman Hodain <rhodain>
Component: ovirt-engineAssignee: eraviv
Status: CLOSED ERRATA QA Contact: Michael Burman <mburman>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4.3CC: dfodor, dholler, emarcus, fdelorey, kkawana, mavital, mperina
Target Milestone: ovirt-4.4.5   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.5.4 Doc Type: Bug Fix
Doc Text:
Previously, a cluster page indicated an out-of-sync cluster when in fact all networks were in sync. This was due to a logical error in the code when a host QoS was assigned to two networks on same host. In this release, the cluster page does not show out-of-sync for this setup.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-14 11:40:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Roman Hodain 2021-01-27 14:40:54 UTC
Description of problem:
The RHV reports the unsynced icon next to the cluster where the QoS us used for one of the networks.

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

How reproducible:
100%

Steps to Reproduce:
1.Crete host Network Qos and assign it to the ovirtmgmt network
2.The cluster shows the unsynced icon

Actual results:
The icon is displayed 

Expected results:
The icon is not displayed and the network synchronization is properly detected. 

Additional info:
The issue is caused by incorrect UUID comparison. We use "==" instead of ".equals".

Patch (Only my local):

From 88c2cc07eb42a2b026c7ca803f3fde05f3b5b755 Mon Sep 17 00:00:00 2001           
From: Roman Hodain <rhodain>                                          
Date: Wed, 27 Jan 2021 15:31:18 +0100                                            
Subject: [PATCH] UUID comparison modifications                                   
                                                                                 
Change-Id: I84e4d61197795594c155714c8fcaae1c07d4d604                             
Signed-off-by: Roman Hodain <rhodain>                                 
---                                                                              
 .../core/vdsbroker/NetworkImplementationDetailsUtils.java       | 2 +-          
 1 file changed, 1 insertion(+), 1 deletion(-)                                   
                                                                                 
diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/NetworkImplementationDetailsUtils.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/NetworkImplementationDetailsUtils.java
index f2c81cc80d7..cb94483f5db 100644                                            
--- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/NetworkImplementationDetailsUtils.java
+++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/NetworkImplementationDetailsUtils.java
@@ -84,7 +84,7 @@ public class NetworkImplementationDetailsUtils {               
         Map<Guid, HostNetworkQos> networkIdsByQos = new HashMap<>();            
         List<HostNetworkQos> allQos = effectiveHostNetworkQos.getAll();         
         allQos.forEach(qos -> {                                                 
-            Optional<Network> network = networks.stream().filter(net -> net.getQosId() == qos.getId()).findFirst();
+            Optional<Network> network = networks.stream().filter(net -> net.getQosId().equals(qos.getId())).findFirst();
             network.ifPresent(net -> networkIdsByQos.put(net.getId(), qos));    
         });                                                                     
         return networkIdsByQos;                                                 
--                                                                               
2.29.2

Comment 1 Michael Burman 2021-01-27 15:26:07 UTC
QE managed to reproduce

Steps:
1. Attach any network to host, it doesn't have to be ovirtmgmt
2. Add host QOS to the network
3. All network changes applied successfully on the host, the host report everything is in sync
4. For some reason the cluster view shows that the hosts in the cluster are out of sync(out of sync icon)

Another flow will be:
1. Create a network with host QoS
2. Attach the network to the host
3. Host is in sync as expected
4. Cluster report out of sync

Comment 4 Michael Burman 2021-02-09 11:56:54 UTC
Verified on - rhvm-4.4.5.4-0.6.el8ev.noarch

Comment 10 errata-xmlrpc 2021-04-14 11:40:02 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 (Moderate: RHV Manager (ovirt-engine) 4.4.z [ovirt-4.4.5] security, bug fix, enhancement), 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/RHSA-2021:1169

Comment 11 meital avital 2022-08-08 19:31:53 UTC
Due to QE capacity, we are not going to cover this issue in our automation