Description of problem: a regression caused by commit 268152abf19fbd64fd867bc5e5e40a57996aedc7 made created snapshots to be with different snapshot_id then the vm_snapshot_id of the image. this behaviour causing the engine to throw Null pointer exception 013-07-04 16:29:05,802 INFO [org.ovirt.engine.core.bll.SPMAsyncTask] (pool-6-thread-49) SPMAsyncTask::ClearAsyncTask: Attempting to clear task 29c9e2af-f254-4021-af0b-e39a59510924 2013-07-04 16:29:05,804 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.SPMClearTaskVDSCommand] (pool-6-thread-49) START, SPMClearTaskVDSCommand( storagePoolId = 83828eac-d311-434d-90e0-ae671a8db853, ignoreFailoverLimit = false, compatabilityVersion = null, taskId = 29c9e2af-f254-4021-af0b-e39a59510924), log id: 46c65fef 2013-07-04 16:29:05,808 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand] (pool-6-thread-49) START, HSMClearTaskVDSCommand(HostName = pluto-vdsb.eng.lab.tlv.redhat.com, HostId = 442357d3-ba0e-41a8-98b9-32aa1868b71b, taskId=29c9e2af-f254-4021-af0b-e39a59510924), log id: 9c46836 2013-07-04 16:29:05,870 INFO [org.ovirt.engine.core.vdsbroker.vdsbroker.HSMClearTaskVDSCommand] (pool-6-thread-49) FINISH, HSMClearTaskVDSCommand, log id: 9c46836 2013-07-04 16:29:05,871 INFO [org.ovirt.engine.core.vdsbroker.irsbroker.SPMClearTaskVDSCommand] (pool-6-thread-49) FINISH, SPMClearTaskVDSCommand, log id: 46c65fef 2013-07-04 16:29:05,894 INFO [org.ovirt.engine.core.bll.SPMAsyncTask] (pool-6-thread-49) BaseAsyncTask::RemoveTaskFromDB: Removed task 29c9e2af-f254-4021-af0b-e39a59510924 from DataBase 2013-07-04 16:29:05,895 INFO [org.ovirt.engine.core.bll.CommandAsyncTask] (pool-6-thread-49) CommandAsyncTask::HandleEndActionResult [within thread]: Removing CommandMultiAsyncTasks object for entity 6629a2b1-0765-4e6e-89ce-659a3ea935d2 2013-07-04 16:29:34,335 INFO [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (http--0.0.0.0-8080-1) Lock Acquired to object EngineLock [exclusiveLocks= key: ac6bf883-2a3a-4a1b-b76c-48ef07896ff8 value: VM , sharedLocks= ] 2013-07-04 16:29:34,365 INFO [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (http--0.0.0.0-8080-1) Running command: RestoreAllSnapshotsCommand internal: false. Entities affected : ID: ac6bf883-2a3a-4a1b-b76c-48ef07896ff8 Type: VM 2013-07-04 16:29:34,366 INFO [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (http--0.0.0.0-8080-1) Locking VM(id = ac6bf883-2a3a-4a1b-b76c-48ef07896ff8) with compensation. 2013-07-04 16:29:34,369 INFO [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (http--0.0.0.0-8080-1) START, SetVmStatusVDSCommand( vmId = ac6bf883-2a3a-4a1b-b76c-48ef07896ff8, status = ImageLocked), log id: 3874aade 2013-07-04 16:29:34,376 INFO [org.ovirt.engine.core.vdsbroker.SetVmStatusVDSCommand] (http--0.0.0.0-8080-1) FINISH, SetVmStatusVDSCommand, log id: 3874aade 2013-07-04 16:29:34,390 INFO [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (http--0.0.0.0-8080-1) Lock freed to object EngineLock [exclusiveLocks= key: ac6bf883-2a3a-4a1b-b76c-48ef07896ff8 value: VM , sharedLocks= ] 2013-07-04 16:29:34,438 INFO [org.ovirt.engine.core.bll.RestoreFromSnapshotCommand] (http--0.0.0.0-8080-1) Running command: RestoreFromSnapshotCommand internal: true. Entities affected : ID: 00000000-0000-0000-0000-000000000000 Type: Storage 2013-07-04 16:29:35,118 INFO [org.ovirt.engine.core.bll.AsyncTaskManager] (DefaultQuartzScheduler_Worker-46) Setting new tasks map. The map contains now 1 tasks 2013-07-04 16:29:49,882 ERROR [org.ovirt.engine.core.bll.RestoreFromSnapshotCommand] (http--0.0.0.0-8080-1) Command org.ovirt.engine.core.bll.RestoreFromSnapshotCommand throw exception: java.lang.NullPointerException at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.removeOtherImageAndParents(RestoreFromSnapshotCommand.java:76) [bll.jar:] at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.removeImages(RestoreFromSnapshotCommand.java:47) [bll.jar:] at org.ovirt.engine.core.bll.RestoreFromSnapshotCommand.executeCommand(RestoreFromSnapshotCommand.java:32) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1122) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1207) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1848) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:151) [utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:118) [utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1225) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:360) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:393) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:378) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runInternalAction(Backend.java:612) [bll.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_03] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_03] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_03] at java.lang.reflect.Method.invoke(Method.java:601) [rt.jar:1.7.0_03] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53) [jboss-invocation.jar:1.1.1.Final] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:36) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final] at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21) [jboss-invocation.jar:1.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation.jar:1.1.1.Final] at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final] at org.jboss.as.ejb3.component.singleton.SingletonComponentInstanceAssociationInterceptor.processInvocation(SingletonComponentInstanceAssociationInterceptor.java:53) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final] at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:202) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:365) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:194) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final] Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Created attachment 768842 [details] The engine log
How reproducible: 100% Steps to Reproduce: 1. Create an image 2. Create a snapshot 3. Preview a snapshot 4. Commit the snaopshot Actual results: Internal error, log throws NPE Expected results: commit should succeed Additional info: A regression caused by 268152abf19fbd64fd867bc5e5e40a57996aedc7
*** Bug 981940 has been marked as a duplicate of this bug. ***
Tested on FCP Data Center Verified, tested on RHEVM 3.3 - IS10 environment: RHEVM: rhevm-3.3.0-0.15.master.el6ev.noarch PythonSDK: rhevm-sdk-python-3.3.0.10-1.el6ev.noarch VDSM: vdsm-4.12.0-61.git8178ec2.el6ev.x86_64 LIBVIRT: libvirt-0.10.2-18.el6_4.9.x86_64 QEMU & KVM: qemu-kvm-rhev-0.12.1.2-2.355.el6_4.5.x86_64 SANLOCK: sanlock-2.8-1.el6.x86_64
bulk closing, assuming verified bugs are in 3.3.