Bug 1130915 - 2 Entries for every VM in Templated - VMs Tab
Summary: 2 Entries for every VM in Templated - VMs Tab
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: 3.5
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.5.0
Assignee: Omer Frenkel
QA Contact: Jiri Belka
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 07:59 UTC by Kevin Alon Goldblatt
Modified: 2016-02-10 19:49 UTC (History)
9 users (show)

Fixed In Version: ovirt-3.5.0_rc3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-17 12:25:02 UTC
oVirt Team: Virt
Embargoed:


Attachments (Terms of Use)
vdsm and engine and server logs (1022.34 KB, application/x-gzip)
2014-08-18 07:59 UTC, Kevin Alon Goldblatt
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 31896 0 master MERGED core: add distinct keyword to search Never
oVirt gerrit 32676 0 ovirt-engine-3.5 MERGED core: add distinct keyword to search Never

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.


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