Bug 1249631 - [Pools] - Failing to create New VM's Pools via UI based on vm template
[Pools] - Failing to create New VM's Pools via UI based on vm template
Status: CLOSED CURRENTRELEASE
Product: oVirt
Classification: Community
Component: ovirt-engine-webadmin (Show other bugs)
3.6
x86_64 Linux
urgent Severity urgent
: ---
: 3.6.0
Assigned To: Roy Golan
Artyom
sla
: Regression, Triaged
: 1251148 1252396 1254582 (view as bug list)
Depends On:
Blocks: 1167284
  Show dependency treegraph
 
Reported: 2015-08-03 08:57 EDT by Michael Burman
Modified: 2016-02-10 14:41 EST (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-04 06:38:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: SLA
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 44353 master MERGED core: Store the Vm ID rather then TEMPLATE ID Never
oVirt gerrit 44458 ovirt-engine-3.6 MERGED core: Store the Vm ID rather then TEMPLATE ID Never

  None (edit)
Description Michael Burman 2015-08-03 08:57:28 EDT
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 03:35:29 EDT
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 04:03:11 EDT
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 04:20:37 EDT
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 10:06:55 EDT
that's a bug in the stored procedure.
Comment 5 Roy Golan 2015-08-10 00:47:59 EDT
*** Bug 1251148 has been marked as a duplicate of this bug. ***
Comment 6 Roy Golan 2015-08-11 08:16:20 EDT
*** Bug 1252396 has been marked as a duplicate of this bug. ***
Comment 7 Roy Golan 2015-08-19 09:01:54 EDT
*** Bug 1254582 has been marked as a duplicate of this bug. ***
Comment 8 Artyom 2015-09-01 07:43:28 EDT
Verified on rhevm-3.6.0-0.12.master.el6.noarch
Comment 9 Sandro Bonazzola 2015-11-04 06:38:16 EST
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.