Bug 1532802

Summary: Webadmin: Listings of VMs, that depend on a template, are multiplied by the number of the template disk copies
Product: [oVirt] ovirt-engine Reporter: Elad <ebenahar>
Component: Frontend.WebAdminAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: samuel macko <smacko>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.1CC: amureini, bugs, lsvaty, lveyde, mperina
Target Milestone: ovirt-4.2.2Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2+
rule-engine: blocker+
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.2.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-29 11:07:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screenshots from Webadmin
none
Duplicated VMs based on events
none
Video capture none

Description Elad 2018-01-09 20:04:55 UTC
Created attachment 1379231 [details]
Screenshots from Webadmin

Description of problem:
Under Virtual machines sub-tab, under Templates tab, the listings of the virtual machines that are depended on a template are multiplied by the number of copied of the template disk

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

How reproducible:
Always

Steps to Reproduce:
1. Have a template with copies on multiple domains
2. Create a VM from the template
3. Navigate to Templates -> Virtual machines -> the relevant template

Actual results:
See screenshots

Expected results:
Listings of VMs, that depend on a template, shouldn't be multiplied by the number of copies of the template

Additional info:
Screenshots from Webadmin

Comment 1 Allon Mureinik 2018-01-11 13:02:01 UTC
The underlying issue is the search returning duplicate results.
Navigating to VMs and using search to search for Template.name='somename' will result in the same faulty behavior.

Comment 2 Allon Mureinik 2018-01-11 13:11:07 UTC
More info to follow up on comment 1 - the search mechanism seems to use a join under hood when you supply a condition on a dependent object (instead of, e.g., using the EXISTS operator). For any such object where several objects adhere to a condition, you'll see duplicated results. E.g., see the screen for searching on events.

Comment 3 Allon Mureinik 2018-01-11 13:16:57 UTC
Created attachment 1380038 [details]
Duplicated VMs based on events

Comment 4 Allon Mureinik 2018-01-11 13:17:44 UTC
Moving to Infra based on comment 2, since this is a general issue with the search.

Comment 5 Elad 2018-01-25 14:49:59 UTC
Created attachment 1386132 [details]
Video capture

Comment 6 Allon Mureinik 2018-01-28 20:01:37 UTC
According to the analysis in the fix, this is a regression introduced by patch a7e724c8686dee8ab03a5f22df17da01170925ca (4.2.0).
Marking it as such for visibility.

Comment 7 Red Hat Bugzilla Rules Engine 2018-01-28 20:01:41 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 8 samuel macko 2018-03-14 15:35:16 UTC
Verified in ovirt version 4.2.2.2-0.1.el7.

Verified by following the reproducer.

Comment 9 Sandro Bonazzola 2018-03-29 11:07:31 UTC
This bugzilla is included in oVirt 4.2.2 release, published on March 28th 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.