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.
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"
it might also be a db upgrade issue, is this a new setup or upgraded? i could not reproduce this on master
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.
that's a bug in the stored procedure.
*** Bug 1251148 has been marked as a duplicate of this bug. ***
*** Bug 1252396 has been marked as a duplicate of this bug. ***
*** Bug 1254582 has been marked as a duplicate of this bug. ***
Verified on rhevm-3.6.0-0.12.master.el6.noarch
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.