Bug 1465862

Summary: [downstream clone - 4.1.4] [RFE] Need UI element to view affinity labels in the VM and host dialog boxes
Product: Red Hat Enterprise Virtualization Manager Reporter: rhev-integ
Component: ovirt-engineAssignee: Phillip Bailey <phbailey>
Status: CLOSED ERRATA QA Contact: Artyom <alukiano>
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: amarchuk, bugs, dfediuck, eheftman, lsurette, mavital, mgoldboi, michal.skrivanek, msivak, phbailey, rbalakri, Rhev-m-bugs, srevivo, ykaul
Target Milestone: ovirt-4.1.4Keywords: FutureFeature, Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Previously, users could use the REST API to add/edit affinity labels for virtual machines and hosts, but they could not view this information in the Administration Portal. In this release, affinity label information is now available in the Administration Portal. It can be seen in the Add/Edit windows for virtual machines and hosts. The window displays all available affinity labels in the system, and for entities with assigned labels, those labels are selected.
Story Points: ---
Clone Of: 1338799 Environment:
Last Closed: 2017-07-27 18:02:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1338799    
Bug Blocks: 1488299    

Description rhev-integ 2017-06-28 11:44:02 UTC
+++ This bug is an upstream to downstream clone. The original bug is: +++
+++   bug 1338799 +++
======================================================================

Description of problem:
With the introduction of the affinity labels feature, a UI element is needed to facilitate selection of the applicable labels for VMs and hosts.

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

(Originally by Phillip Bailey)

Comment 4 rhev-integ 2017-06-28 11:44:21 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

(Originally by rule-engine)

Comment 5 rhev-integ 2017-06-28 11:44:28 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

(Originally by rule-engine)

Comment 6 rhev-integ 2017-06-28 11:44:33 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

(Originally by rule-engine)

Comment 7 rhev-integ 2017-06-28 11:44:38 UTC
this doesn't seem to be ready in 4.0. For 4.1 I strongly suggest to review the proposed solution and move the affinity labels display out of the general subtab of host dialog (in the middle of connection info used for deployment) and out of the general subtab of VM dialog (putting it in front of the basic configuration doesn't make sense, it also makes the subtab even longer so the disks and nics are always invisible without scrolling down). Espcially since it's a R/O information it doesn't even belong to the dialogs.
Hence moving back to POST

(Originally by michal.skrivanek)

Comment 8 rhev-integ 2017-06-28 11:44:44 UTC
Can you please review the 4.1 status of this with virt team and either revert it or move it to a different subtab only maybe?

(Originally by Martin Sivak)

Comment 15 rhev-integ 2017-07-13 18:00:32 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops

Comment 17 rhev-integ 2017-07-18 13:08:41 UTC
WARN: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops: Bug status wasn't changed from MODIFIED to ON_QA due to the following reason:

[Found clone flags: ['rhevm-4.1.z', 'rhevm-4.2-ga'], ]

For more info please contact: rhv-devops

Comment 18 Anton Marchukov 2017-07-18 15:00:29 UTC
Per Martin Sivak this is 4.1 only. Removing 4.2 flag.

Comment 20 Artyom 2017-07-19 08:30:57 UTC
Verified on rhevm-4.1.4.1-0.1.el7.noarch

1) Create a label from the Affinity Labels sub tab under the Clusters main tab and add hosts/VMs to it. Then, ensure that the label shows up in the sub tabs under the VMs and Hosts main tabs when those hosts/VMs are selected.
2) Create a label from the Affinity Labels sub tab under the VMs main tab. The selected VM should be selected in the dialog automatically. Save the label and ensure that it shows up in the sub tab.
3) Repeat the test above in the Hosts main tab.
4) Edit a label from the Affinity Labels sub tab under the VMs main tab that has members other than the selected VM. Remove a member other than the selected VM and click 'OK'. Ensure that the members list in the sub tab shows the correct members.
5) Repeat the test above, but remove the selected VM. Ensure that the label no longer shows in the sub tab.
Repeat the two tests above in the Hosts main tab.
6) Attempt to delete a label from the Affinity Labels sub tab under the Clusters main tab. You should receive a message informing you that all members must be removed before the label can be deleted.
7) Edit a label from the Affinity Labels sub tab under the Clusters main tab and remove all members. Click 'OK'. Delete the label. Ensure that the label is removed from the sub tab.
8) When there are no labels selected, a message should be displayed informing you of this.
9) Labels should always be ordered alphabetically.
10) Selecting the same label twice (by clicking 'Add') should result in no change to the list.
11) Clicking the 'x' next to the label name should remove it from the selected labels list.
12) Label names should continue to wrap around and fill the column they're in and shouldn't overflow the panel when there isn't enough space to display all of them simultaneously. 
13) Create a new VM and add affinity labels from the side tab. Save the VM and edit it. Ensure the correct labels are displayed.
14) Edit a VM that has affinity labels applied and delete one or more of them. Save the VM and edit it again. Ensure the deleted labels are no longer displayed.
15) Add and remove affinity labels to/from a VM from the sub tab. Edit the VM and ensure that the changes are reflected in the side tab.

Comment 23 errata-xmlrpc 2017-07-27 18:02:44 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, 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-2017:1814