Bug 1921119 - RHV reports unsynced cluster when host QoS is in use.
Summary: RHV reports unsynced cluster when host QoS is in use.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.4.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.5
: ---
Assignee: eraviv
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-27 14:40 UTC by Roman Hodain
Modified: 2021-04-14 11:40 UTC (History)
6 users (show)

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.
Clone Of:
Environment:
Last Closed: 2021-04-14 11:40:02 UTC
oVirt Team: Network
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 5767901 0 None None None 2021-02-02 19:04:29 UTC
Red Hat Product Errata RHSA-2021:1169 0 None None None 2021-04-14 11:40:27 UTC
oVirt gerrit 113265 0 master MERGED core: fix qos to network matching 2021-02-12 14:47:27 UTC

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@redhat.com>                                          
Date: Wed, 27 Jan 2021 15:31:18 +0100                                            
Subject: [PATCH] UUID comparison modifications                                   
                                                                                 
Change-Id: I84e4d61197795594c155714c8fcaae1c07d4d604                             
Signed-off-by: Roman Hodain <rhodain@redhat.com>                                 
---                                                                              
 .../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


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