Bug 917719
Summary: | engine: CreateAllSnapshotsFromVm threw an exception during vdsm restart | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Dafna Ron <dron> | ||||
Component: | ovirt-engine | Assignee: | Maor <mlipchuk> | ||||
Status: | CLOSED ERRATA | QA Contact: | Dafna Ron <dron> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 3.2.0 | CC: | acathrow, amureini, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, scohen, yeylon, ykaul | ||||
Target Milestone: | --- | ||||||
Target Release: | 3.2.0 | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | storage | ||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
When attempting to update a snapshot which did not exist, the createAllSnapshotCommand execution encountered a rollback, deleting the new snapshot and causing an SQL exception. Now, when a non-existent snapshot is updated, VDSM fails the action. A snapshot can only be updated when it is already created in the database.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2013-06-10 21:35:21 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 948448 | ||||||
Attachments: |
|
Merged with change id Ia96cd0958dcdb34d590a160b422b3b2562149344 verified on sf10 This bug is currently attached to errata RHEA-2013:14491. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag. Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information: * Cause: What actions or circumstances cause this bug to present. * Consequence: What happens when the bug presents. * Fix: What was done to fix the bug. * Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore') Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug. For further details on the Cause, Consequence, Fix, Result format please refer to: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks in advance. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHSA-2013-0888.html |
Created attachment 705058 [details] logs Description of problem: reateAllSnapshotsFromVm threw an exception when we restart vdsm during create live snapshot Version-Release number of selected component (if applicable): sf9 How reproducible: 100% Steps to Reproduce: 1. create a vm and run it 2. once vm is up, create a live snapshot 3. restart vdsm after the create snapshot dialogue is closed and before the disks get locked. Actual results: reateAllSnapshotsFromVm threw an exception Expected results: we should not have an exception Additional info:logs 2013-03-04 05:56:39,678 ERROR [org.ovirt.engine.core.bll.SPMAsyncTask] (QuartzScheduler_Worker-71) BaseAsyncTask::LogEndTaskFailure: Task dd23737f-0d73-43d6-8359-40cf90f2af39 (Parent Command CreateAllSnapshotsFromVm, Parameters Type org .ovirt.engine.core.common.asynctasks.AsyncTaskParameters) ended with failure: -- Result: success -- Message: Asynchronous Task unknown error, -- Exception: [null] 2013-03-04 05:56:39,678 INFO [org.ovirt.engine.core.bll.EntityAsyncTask] (QuartzScheduler_Worker-71) EntityAsyncTask::EndActionIfNecessary: All tasks of entity 0acdee33-e734-4366-ab58-892d080e0ba7 has ended -> executing EndAction 2013-03-04 05:56:39,678 INFO [org.ovirt.engine.core.bll.EntityAsyncTask] (QuartzScheduler_Worker-71) EntityAsyncTask::EndAction: Ending action for 2 tasks (entity ID: 0acdee33-e734-4366-ab58-892d080e0ba7): calling EndAction for action type CreateAllSnapshotsFromVm. 2013-03-04 05:56:39,678 INFO [org.ovirt.engine.core.bll.EntityAsyncTask] (pool-3-thread-47) EntityAsyncTask::EndCommandAction [within thread] context: Attempting to EndAction CreateAllSnapshotsFromVm, executionIndex: 0 2013-03-04 05:56:39,692 ERROR [org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand] (pool-3-thread-47) Ending command with failure: org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand 2013-03-04 05:56:39,702 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (pool-3-thread-47) transaction rolled back 2013-03-04 05:56:39,704 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (pool-3-thread-47) transaction rolled back 2013-03-04 05:56:39,721 ERROR [org.ovirt.engine.core.bll.EntityAsyncTask] (pool-3-thread-47) EntityAsyncTask::EndCommandAction [within thread]: EndAction for action type CreateAllSnapshotsFromVm threw an exception: org.springframework.d ao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call updatesnapshotid(?, ?)}]; ERROR: null value in column "snapshot_id" violates not-null constraint Where: SQL statement "UPDATE snapshots SET snapshot_id = $1 WHERE snapshot_id = $2 " PL/pgSQL function "updatesnapshotid" 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 "UPDATE snapshots SET snapshot_id = $1 WHERE snapshot_id = $2 " PL/pgSQL function "updatesnapshotid" 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.SnapshotDaoDbFacadeImpl.updateId(SnapshotDaoDbFacadeImpl.java:61) [engine-dal.jar:] at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.revertToActiveSnapshot(CreateAllSnapshotsFromVmCommand.java:258) [engine-bll.jar:] at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand$1.runInTransaction(CreateAllSnapshotsFromVmCommand.java:181) [engine-bll.jar:] at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand$1.runInTransaction(CreateAllSnapshotsFromVmCommand.java:166) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [engine-utils.jar:] at org.ovirt.engine.core.bll.CreateAllSnapshotsFromVmCommand.endVmCommand(CreateAllSnapshotsFromVmCommand.java:166) [engine-bll.jar:] at org.ovirt.engine.core.bll.VmCommand.endWithFailure(VmCommand.java:229) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.internalEndWithFailure(CommandBase.java:573) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.endActionInTransactionScope(CommandBase.java:485) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1511) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [engine-utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:141) [engine-utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:110) [engine-utils.jar:] at org.ovirt.engine.core.bll.CommandBase.endAction(CommandBase.java:429) [engine-bll.jar:] at org.ovirt.engine.core.bll.Backend.endAction(Backend.java:379) [engine-bll.jar:] at sun.reflect.GeneratedMethodAccessor254.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] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee.jar:7.1.3.Final-redhat-4] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-2] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation.jar:1.1.1.Final-redhat-2] at org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor.injectWebContextToThreadLocal(ThreadLocalSessionCleanerInterceptor.java:11) [engine-utils.jar:] at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source) [:1.7.0_09-icedtea] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_09-icedtea]