Bug 1130915

Summary: 2 Entries for every VM in Templated - VMs Tab
Product: [Retired] oVirt Reporter: Kevin Alon Goldblatt <kgoldbla>
Component: ovirt-engine-webadminAssignee: Omer Frenkel <ofrenkel>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5CC: bugs, ecohen, gklein, iheim, mgoldboi, michal.skrivanek, ofrenkel, rbalakri, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: virt
Fixed In Version: ovirt-3.5.0_rc3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-17 12:25:02 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:
Attachments:
Description Flags
vdsm and engine and server logs none

Description Kevin Alon Goldblatt 2014-08-18 07:59:57 UTC
Created attachment 927722 [details]
vdsm and engine and server logs

Description of problem:
Created Pool of VM's from template. Each VM appears twice in the Template -  VMs tab

Version-Release number of selected component (if applicable):
ovirt-engine-3.5.0-0.0.master.20140804172041.git23b558e.el6.noarch
vdsm-4.16.1-6.gita4a4614.el6.x86_64

How reproducible:
Every time

Steps to Reproduce:
Steps to Reproduce:
1. created a VM with 1 disk of 2 GB thinly provisioned on a iscsi block device
2. Created a template of the VM
3. Created a Pool of 3 VMs from the template
4. Brought up one of the VMs 
5. Checked the Used and Available space on the Storage Domain
6. Created a snapshot of the VM that was brought up
7. Checked the Template Tab >>> Vritual Machine Sub Tab >>> List of VMs - >>>>ALL the VMs are displayed twice

SEE THE ATTACHED SCREEN SHOT

Actual results:
All the VMs in the list are displayed twice

Expected results:
Each VM should only be displayed once


Additional info:

Comment 1 Omer Frenkel 2014-08-19 14:34:04 UTC
the problem is that vm_templates_storage_domain db view returns duplicate templates, and the search is using it, so we get duplicate result.
i saw the same with just creating a vm from template (thin provision)
this also happens when searching by template name in the VMs main tab (Vms: Templates.name=*)

Comment 2 Omer Frenkel 2014-08-21 13:01:33 UTC
update, after investigation: this view returns duplicates, because it is doing a join with vm-device table, that is the link between template and its disks (to get the storage domain) which has multiple device per template, hence multiple results.

the bigger problem is that we will always get multiple result for templates with multiple disks on multiple domains, seems the only way out is using distinct in the search queries

Comment 3 Jiri Belka 2014-10-01 09:52:18 UTC
ok, looks good with rhevm-backend-3.5.0-0.13.beta.el6ev.noarch

Comment 4 Sandro Bonazzola 2014-10-17 12:25:02 UTC
oVirt 3.5 has been released and should include the fix for this issue.