Bug 1249631 - [Pools] - Failing to create New VM's Pools via UI based on vm template
Summary: [Pools] - Failing to create New VM's Pools via UI based on vm template
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: ovirt-engine-webadmin
Version: 3.6
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: 3.6.0
Assignee: Roy Golan
QA Contact: Artyom
URL:
Whiteboard: sla
: 1251148 1252396 1254582 (view as bug list)
Depends On:
Blocks: 1167284
TreeView+ depends on / blocked
 
Reported: 2015-08-03 12:57 UTC by Michael Burman
Modified: 2016-02-10 19:41 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-04 11:38:16 UTC
oVirt Team: SLA
Embargoed:


Attachments (Terms of Use)
logs (359.81 KB, application/x-gzip)
2015-08-03 12:57 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 44353 0 master MERGED core: Store the Vm ID rather then TEMPLATE ID Never
oVirt gerrit 44458 0 ovirt-engine-3.6 MERGED core: Store the Vm ID rather then TEMPLATE ID Never

Description Michael Burman 2015-08-03 12:57:28 UTC
Created attachment 1058767 [details]
logs

Description of problem:
[Pools] - Failing to create New VM's Pools via UI based on vm template.

When trying to create new VM Pool via [Pools] main tab based on existing vm template(template's status is OK) i'm failing with error in the event log:
'Failed to create VM Pool new (User: admin@internal).'
'Failed to create VM new-2 (User: admin@internal).'
'Failed to create VM new-1 (User: admin@internal).'

Version-Release number of selected component (if applicable):
3.6.0-0.0.master.20150730085151.git25ae1b5.el6

How reproducible:
100

Steps to Reproduce:
1. Create template from VM
2. Try to create new Pool via [Pools] main tab in UI based on template from step 1 ^^. no matter the number of VMs, can be 1. 

Actual results:
Failed to create VM Pool

Expected results:
Should succeed 

Additional info:
I noticed this issue when was trying to verify BZ 1167284 and got blocked by this issue.

Comment 1 Michal Skrivanek 2015-08-04 07:35:29 UTC
seems related to VM pinning to multiple hosts feature


2015-08-03 15:37:00,074 ERROR [org.ovirt.engine.core.bll.AddVmCommand] (org.ovirt.thread.pool-8-thread-32) [] Command 'org.ovirt.engine.core.bll.AddVmCommand' failed: Callabl
eStatementCallback; SQL [{call insertvmstatic(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
 ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "vm_host_pinning_map_vm_id_key"
  Where: SQL statement "INSERT INTO vm_host_pinning_map(vm_id, vds_id) SELECT  $1 , vds_id FROM fnSplitterUuid( $2 ) as vds_id"
PL/pgSQL function "insertdedicatedhoststovm" line 2 at SQL statement
SQL statement "SELECT  InsertDedicatedHostsToVm( $1 ,  $2 )"
PL/pgSQL function "insertvmstatic" line 149 at PERFORM; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "vm_host_
pinning_map_vm_id_key"

Comment 2 Omer Frenkel 2015-08-04 08:03:11 UTC
it might also be a db upgrade issue, is this a new setup or upgraded?
i could not reproduce this on master

Comment 3 Michael Burman 2015-08-04 08:20:37 UTC
Hi Omer,

It's upgraded setup.
May be the template that i'm trying to create pool from is locked in db? although the status of this template is OK.

Omer, if you want you can enter my setup and see it, it's still there. feel free to contact me, thanks.

Comment 4 Roy Golan 2015-08-04 14:06:55 UTC
that's a bug in the stored procedure.

Comment 5 Roy Golan 2015-08-10 04:47:59 UTC
*** Bug 1251148 has been marked as a duplicate of this bug. ***

Comment 6 Roy Golan 2015-08-11 12:16:20 UTC
*** Bug 1252396 has been marked as a duplicate of this bug. ***

Comment 7 Roy Golan 2015-08-19 13:01:54 UTC
*** Bug 1254582 has been marked as a duplicate of this bug. ***

Comment 8 Artyom 2015-09-01 11:43:28 UTC
Verified on rhevm-3.6.0-0.12.master.el6.noarch

Comment 9 Sandro Bonazzola 2015-11-04 11:38:16 UTC
oVirt 3.6.0 has been released on November 4th, 2015 and should fix this issue.
If problems still persist, please open a new BZ and reference this one.


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