Description of problem: Internal Server Error after trying to add a Vm and specify a host Version-Release number of selected component (if applicable): ovirt-engine-3.6.0-0.0.master.20150804111407.git122a3a0.el6.noarch How reproducible: 50% ? I'm not sure why sometimes fails others don't, seems to fail for SPM always. Steps to Reproduce: 1. Add a vm with a name, and in Host tab-> Start runing on select an specific host (for example the SPM) Actual results: Fails creating with Internal Server Error 015-08-11 13:13:01,704 INFO [org.ovirt.engine.core.bll.AddVmCommand] (default task-18) [] Running co mmand: AddVmCommand internal: false. Entities affected : ID: 9a543f3d-fd10-4491-a704-51b041243f81 Typ e: VdsGroupsAction group CREATE_VM with role type USER, ID: 00000000-0000-0000-0000-000000000000 Type : VmTemplateAction group CREATE_VM with role type USER, ID: 9a543f3d-fd10-4491-a704-51b041243f81 Type : VdsGroupsAction group EDIT_ADMIN_VM_PROPERTIES with role type ADMIN 2015-08-11 13:13:01,782 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (default ta sk-18) [] transaction rolled back 2015-08-11 13:13:01,783 ERROR [org.ovirt.engine.core.bll.AddVmCommand] (default task-18) [] Command 'o rg.ovirt.engine.core.bll.AddVmCommand' failed: CallableStatementCallback; SQL [{call insertvmstatic(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ER ROR: 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 fnSpli tterUuid( $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.PSQLEx ception: 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 fnSpli tterUuid( $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 2015-08-11 13:13:01,783 ERROR [org.ovirt.engine.core.bll.AddVmCommand] (default task-18) [] Exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertvmstatic(? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? , ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; E RROR: 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 fnSpli tterUuid( $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" 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 Expected results: Vm is created and start running in the specified host. Additional info: Happens with the REST API too adding the placement policy: <vm> ... <placement_policy> <host id="afd7ce7a-b92f-4376-844a-63a0aa195c91"/> </placement_policy> </vm>
that was fixed upstream already *** This bug has been marked as a duplicate of bug 1249631 ***