Bug 855620 - engine: null value in column "snapshot_id" when trying to create a snapshot from vm with direct lun
engine: null value in column "snapshot_id" when trying to create a snapshot...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.1.0
x86_64 Linux
high Severity high
: ---
: 3.1.0
Assigned To: Liron Aravot
Leonid Natapov
storage
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-09 07:41 EDT by Dafna Ron
Modified: 2016-02-10 12:53 EST (History)
11 users (show)

See Also:
Fixed In Version: SI18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-04 15:06:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log (372.27 KB, application/x-xz)
2012-09-09 07:41 EDT, Dafna Ron
no flags Details

  None (edit)
Description Dafna Ron 2012-09-09 07:41:48 EDT
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
Comment 1 Liron Aravot 2012-09-10 09:33:25 EDT
cannot reproduce, tested with latest commit 2beeb26d5ef46219f0b80e1f4435b78364a4100d
Comment 2 Dafna Ron 2012-09-10 09:45:45 EDT
please test with si17 commit - I am working with si17 and not current commit.
Comment 4 Liron Aravot 2012-09-10 10:29:24 EDT
works as expected with latest commit 2beeb26d5ef46219f0b80e1f4435b78364a4100d
Comment 5 Yaniv Kaul 2012-09-10 11:22:44 EDT
(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?
Comment 6 Dafna Ron 2012-09-16 05:02:10 EDT
verified on si18

Note You need to log in before you can comment on or make changes to this bug.