Created attachment 611186[details]
log
Description of problem:
we fail to create a snapshot for vm with direct lun with the following error:
ERROR: null value in column "snapshot_id" violates not-null constraint
Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )"
PL/pgSQL function "insertsnapshot" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates not-null constraint
Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )"
PL/pgSQL function "insertsnapshot" line 2 at SQL statement
Version-Release number of selected component (if applicable):
si17
How reproducible:
100%
Steps to Reproduce:
1. create a vm with one direct lun
2. try to create snapshot
3.
Actual results:
we fail with the below error:
ERROR: null value in column "snapshot_id" violates not-null constraint
Expected results:
we either should get a CanDoAction or succeed.
Additional info:
2012-09-09 13:56:29,494 ERROR [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (pool-4-thread-39) [b33be30] Command org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertsnapshot(?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: null value in column "snapshot_id" violates not-null constraint
Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )"
PL/pgSQL function "insertsnapshot" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates not-null constraint
Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )"
PL/pgSQL function "insertsnapshot" line 2 at SQL statement
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245) [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.DefaultGenericDaoDbFacade.save(DefaultGenericDaoDbFacade.java:93) [engine-dal.jar:]
at org.ovirt.engine.core.bll.snapshots.SnapshotsManager.addSnapshot(SnapshotsManager.java:133) [engine-bll.jar:]
at org.ovirt.engine.core.bll.snapshots.SnapshotsManager.addSnapshot(SnapshotsManager.java:96) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.ExecuteVmCommand(CreateAllSnapshotsFromVmCommand.java:81) [engine-bll.jar:]
at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:83) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:819) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:910) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1269) [engine-bll.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [engine-utils.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:142) [engine-utils.jar:]
at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:109) [engine-utils.jar:]
at org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:925) [engine-bll.jar:]
at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:275) [engine-bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182) [engine-bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162) [engine-bll.jar:]
at org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84) [engine-bll.jar:]
at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64) [engine-utils.jar:]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_05-icedtea]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_05-icedtea]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_05-icedtea]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05-icedtea]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05-icedtea]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea]
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates
(In reply to comment #4)
> works as expected with latest commit 2beeb26d5ef46219f0b80e1f4435b78364a4100d
Was it fixed? In which build? Why was it moved to ON_QA?
Created attachment 611186 [details] log Description of problem: we fail to create a snapshot for vm with direct lun with the following error: ERROR: null value in column "snapshot_id" violates not-null constraint Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "insertsnapshot" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates not-null constraint Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "insertsnapshot" line 2 at SQL statement Version-Release number of selected component (if applicable): si17 How reproducible: 100% Steps to Reproduce: 1. create a vm with one direct lun 2. try to create snapshot 3. Actual results: we fail with the below error: ERROR: null value in column "snapshot_id" violates not-null constraint Expected results: we either should get a CanDoAction or succeed. Additional info: 2012-09-09 13:56:29,494 ERROR [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (pool-4-thread-39) [b33be30] Command org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand throw exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertsnapshot(?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: null value in column "snapshot_id" violates not-null constraint Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "insertsnapshot" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates not-null constraint Where: SQL statement "INSERT INTO snapshots( snapshot_id, status, vm_id, snapshot_type, description, creation_date, app_list, vm_configuration) VALUES( $1 , $2 , $3 , $4 , $5 , $6 , $7 , $8 )" PL/pgSQL function "insertsnapshot" line 2 at SQL statement at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245) [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.DefaultGenericDaoDbFacade.save(DefaultGenericDaoDbFacade.java:93) [engine-dal.jar:] at org.ovirt.engine.core.bll.snapshots.SnapshotsManager.addSnapshot(SnapshotsManager.java:133) [engine-bll.jar:] at org.ovirt.engine.core.bll.snapshots.SnapshotsManager.addSnapshot(SnapshotsManager.java:96) [engine-bll.jar:] at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.ExecuteVmCommand(CreateAllSnapshotsFromVmCommand.java:81) [engine-bll.jar:] at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:83) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:819) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:910) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1269) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [engine-utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:142) [engine-utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:109) [engine-utils.jar:] at org.ovirt.engine.core.bll.CommandBase.Execute(CommandBase.java:925) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.ExecuteAction(CommandBase.java:275) [engine-bll.jar:] at org.ovirt.engine.core.bll.MultipleActionsRunner.executeValidatedCommands(MultipleActionsRunner.java:182) [engine-bll.jar:] at org.ovirt.engine.core.bll.MultipleActionsRunner.RunCommands(MultipleActionsRunner.java:162) [engine-bll.jar:] at org.ovirt.engine.core.bll.MultipleActionsRunner$1.run(MultipleActionsRunner.java:84) [engine-bll.jar:] at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:64) [engine-utils.jar:] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_05-icedtea] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_05-icedtea] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_05-icedtea] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05-icedtea] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05-icedtea] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05-icedtea] Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "snapshot_id" violates