Created attachment 670775[details]
logs
Description of problem:
Can not import exported VM
2012-12-30 21:25:23,384 INFO [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-14) Checking if user vdcadmin is an admin, result true
2012-12-30 21:25:23,766 ERROR [org.ovirt.engine.core.bll.ImportVmTemplateCommand] (ajp-/127.0.0.1:8702-14) [522] Command org.ovirt.engine.core.bll.ImportVmTemplateCommand throw exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertvmtemplate(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "vm_ovf_generations_pkey"
Where: SQL statement "INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES ( $1 , (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = $2 ))"
PL/pgSQL function "insertvmtemplate" line 81 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "vm_ovf_generations_pkey"
Where: SQL statement "INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES ( $1 , (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = $2 ))"
PL/pgSQL function "insertvmtemplate" line 81 at SQL statement
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:241) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:124) [engine-dal.jar:]
at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:37) [engine-dal.jar:]
at org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.save(VmTemplateDAODbFacadeImpl.java:125) [engine-dal.jar:]
at org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.save(VmTemplateDAODbFacadeImpl.java:27) [engine-dal.jar:]
at org.ovirt.engine.core.bll.ImportVmTemplateCommand.addVmTemplateToDb(ImportVmTemplateCommand.java:328) [engine-bll.jar:]
at org.ovirt.engine.core.bll.ImportVmTemplateCommand$1.runInTransaction(ImportVmTemplateCommand.java:247) [engine-bll.jar:]
at org.ovirt.engine.core.bll.ImportVmTemplateCommand$1.runInTransaction(ImportVmTemplateCommand.java:242) [engine-bll.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [engine-utils.jar:]
at org.ovirt.engine.core.bll.ImportVmTemplateCommand.executeCommand(ImportVmTemplateCommand.java:242) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:997) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1082) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1463) [engine-bll.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:166) [engine-utils.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:108) [engine-utils.jar:]
at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1100) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:302) [engine-bll.jar:]
at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:358) [engine-bll.jar:]
at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:304) [engine-bll.jar:]
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.7.0_09-icedtea]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]
at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea]
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info:
Ayal, indeed.
Kiril, just to be sure that there's no scenario that we aren't aware of - did it happend when doing one of the following (both scenarios- not as Clone)? or different flow?
1. export the vm template, delete it and then import it
2. try to import vm template, having a failure and then attempt to import it again
thanks.
(In reply to comment #4)
> Ayal, indeed.
> Kiril, just to be sure that there's no scenario that we aren't aware of -
> did it happend when doing one of the following (both scenarios- not as
> Clone)? or different flow?
> 1. export the vm template, delete it and then import it
Eyal can you post a link to the job to check if this is the scenario ?
> 2. try to import vm template, having a failure and then attempt to import it
> again
We can not do it. It a jenkins job.
>
> thanks.
Created attachment 670775 [details] logs Description of problem: Can not import exported VM 2012-12-30 21:25:23,384 INFO [org.ovirt.engine.core.bll.LoginUserCommand] (ajp-/127.0.0.1:8702-14) Checking if user vdcadmin is an admin, result true 2012-12-30 21:25:23,766 ERROR [org.ovirt.engine.core.bll.ImportVmTemplateCommand] (ajp-/127.0.0.1:8702-14) [522] Command org.ovirt.engine.core.bll.ImportVmTemplateCommand throw exception: org.springframework.dao.DuplicateKeyException: CallableStatementCallback; SQL [{call insertvmtemplate(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "vm_ovf_generations_pkey" Where: SQL statement "INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES ( $1 , (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = $2 ))" PL/pgSQL function "insertvmtemplate" line 81 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "vm_ovf_generations_pkey" Where: SQL statement "INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES ( $1 , (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id = $2 ))" PL/pgSQL function "insertvmtemplate" line 81 at SQL statement at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:241) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:124) [engine-dal.jar:] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:37) [engine-dal.jar:] at org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.save(VmTemplateDAODbFacadeImpl.java:125) [engine-dal.jar:] at org.ovirt.engine.core.dao.VmTemplateDAODbFacadeImpl.save(VmTemplateDAODbFacadeImpl.java:27) [engine-dal.jar:] at org.ovirt.engine.core.bll.ImportVmTemplateCommand.addVmTemplateToDb(ImportVmTemplateCommand.java:328) [engine-bll.jar:] at org.ovirt.engine.core.bll.ImportVmTemplateCommand$1.runInTransaction(ImportVmTemplateCommand.java:247) [engine-bll.jar:] at org.ovirt.engine.core.bll.ImportVmTemplateCommand$1.runInTransaction(ImportVmTemplateCommand.java:242) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [engine-utils.jar:] at org.ovirt.engine.core.bll.ImportVmTemplateCommand.executeCommand(ImportVmTemplateCommand.java:242) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:997) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1082) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1463) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:166) [engine-utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:108) [engine-utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1100) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:302) [engine-bll.jar:] at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:358) [engine-bll.jar:] at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:304) [engine-bll.jar:] at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source) [:1.7.0_09-icedtea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_09-icedtea] Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info: