Bug 1787854

Summary: RHV: Updating/reinstall a host which is part of affinity labels is removed from the affinity label.
Product: Red Hat Enterprise Virtualization Manager Reporter: Pawan kumar Vilayatkar <pvilayat>
Component: ovirt-engineAssignee: Andrej Krejcir <akrejcir>
Status: CLOSED ERRATA QA Contact: Polina <pagranat>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.6CC: akrejcir, mperina, pelauter
Target Milestone: ovirt-4.4.1Flags: lsvaty: testing_plan_complete-
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhv-4.4.0-28 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-23 16:11:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pawan kumar Vilayatkar 2020-01-05 09:19:38 UTC
Description of problem:

I have created a negative affinity with 2 VM's and two hosts and then added an affinity label.

On updating the host2 from the RHVM portal it left the affinity the label. The only workaround is to re-add the host back to affinity label. 


Version-Release number of selected component (if applicable):
rhvm-4.3.6.7-0.1.el7.noarch  

How reproducible:


Steps to Reproduce:
1. Create an affinity label
2. Add two or more hosts to an affinity label
3. Add VM to host in affinity label.
4. Re-install or upgrade the host from the affinity label.
5. It is removed from the affinity label

Actual results:
The host is removed from the affinity label.


Expected results:
After reinstall from RHVM portal or upgrade should not remove the host from
affinity as the vds_id will remain the same.

Additional info:

Comment 1 Ryan Barry 2020-01-06 00:51:24 UTC
Martin/Andrej -

ovirt-host-deploy or engine? With vds_id remaining constant, I'd expect engine to remember, but not sure where it falls

Comment 2 Andrej Krejcir 2020-01-06 10:08:44 UTC
The bug is in the engine. Reinstalling a host calls UpdateVdsCommand with default parameter for affinity labels, which is an empty list.

Comment 11 errata-xmlrpc 2020-09-23 16:11:04 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: Red Hat Virtualization security, bug fix, and enhancement update), 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-2020:3807