Bug 873595 - engine: NPE when previewing a snapshot created with no disks after adding a disk
Summary: engine: NPE when previewing a snapshot created with no disks after adding a disk
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.1.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 3.2.0
Assignee: Liron Aravot
QA Contact: Dafna Ron
URL:
Whiteboard: storage
Depends On:
Blocks: 915537
TreeView+ depends on / blocked
 
Reported: 2012-11-06 09:35 UTC by Dafna Ron
Modified: 2016-02-10 16:57 UTC (History)
9 users (show)

Fixed In Version: sf3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
log (92.26 KB, application/x-xz)
2012-11-06 09:35 UTC, Dafna Ron
no flags Details

Description Dafna Ron 2012-11-06 09:35:34 UTC
Created attachment 639223 [details]
log

Description of problem:

we get NPE when we preview a snapshot created from a vm with no disks after adding a disk to the vm
although UI shows that the snapshot is previewed its not actually previewed 
undo will have no effect
commit will cause a second NPE

Version-Release number of selected component (if applicable):

si24

How reproducible:

100%

Steps to Reproduce:
1. create a vm with no disk
2. create a snapshot
3. create a disk to the vm
4. preview snapshot

  
Actual results:

we get NPE and UI shows: Error while executing action Preview Snapshot: Internal oVirt Engine Error

Expected results:

we should not get NPE

Additional info: full log attached 

2012-11-06 11:22:50,278 INFO  [org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand] (ajp-/127.0.0.1:8702-11) [26d40812] Running command: TryBackToAllSnapshotsOfVmCommand internal: false. Entities affected :  ID: 93ff1170-52dc-42c
7-991c-ce9bc3b93f95 Type: VM
2012-11-06 11:22:50,755 ERROR [org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand] (ajp-/127.0.0.1:8702-11) [26d40812] Command org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand throw exception: java.lang.NullPointerExce
ption
        at org.ovirt.engine.core.utils.ovf.OvfWriter.BuildDisk(OvfWriter.java:152) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.ovf.OvfManager.BuildOvf(OvfManager.java:92) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.ovf.OvfManager.ExportVm(OvfManager.java:24) [engine-utils.jar:]
        at org.ovirt.engine.core.bll.VmCommand.UpdateVmInSpm(VmCommand.java:182) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.UpdateVmInSpm(VmCommand.java:156) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.restoreVmConfigFromSnapshot(TryBackToAllSnapshotsOfVmCommand.java:109) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.ExecuteVmCommand(TryBackToAllSnapshotsOfVmCommand.java:175) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.executeCommand(VmCommand.java:78) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:875) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:972) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1371) [engine-bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:168) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:107) [engine-utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:990) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:291) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:350) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:299) [engine-bll.jar:]
        at sun.reflect.GeneratedMethodAccessor276.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.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:374) [jboss-invocation.jar:1.1.1.Final-redhat-1]
        at org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor.injectWebContextToThreadLocal(ThreadLocalSessionCleanerInterceptor.java:11) [engine-utils.jar:]
        at sun.reflect.GeneratedMethodAccessor22.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.ManagedReferenceLifecycleMethodInterceptorFactory$ManagedReferenceLifecycleMethodInterceptor.processInvocation(ManagedReferenceLifecycleMethodInterceptorFactory.java:123) [jboss-as-ee.jar:7.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-1]

Comment 4 Liron Aravot 2012-11-07 15:16:14 UTC
Why is it marked as regression? when did it work for snapshots without disks?

Comment 5 Dafna Ron 2012-11-07 16:02:56 UTC
since we moved to a disk entity and allowed creating a snapshot for a vm without a disk

Comment 6 Liron Aravot 2012-11-08 09:05:07 UTC
I've meant to the mentioned scenario, preview ever after vm had disks ever worked for previous snapshots without disks?

Comment 7 Dafna Ron 2012-11-08 09:09:47 UTC
(In reply to comment #6)
> I've meant to the mentioned scenario, preview ever after vm had disks ever
> worked for previous snapshots without disks?

yes

Comment 8 Liron Aravot 2012-11-08 17:21:47 UTC
http://gerrit.ovirt.org/#/c/9128/

Comment 9 mkublin 2012-11-14 13:14:57 UTC
The commit was reverted, because of causing performance regression at transaction manager.

Change of revert: 
http://gerrit.ovirt.org/#/c/9240/

Comment 10 Ayal Baron 2012-12-25 14:42:10 UTC
Reintroduced upstream, change id: I5c9fd926e61e860f4af9ff460c6657cf81b1fc85

Comment 11 Dafna Ron 2013-01-07 16:58:08 UTC
preview works but undo has a java.lang.IndexOutOfB
oundsException
verifying this bug for sf3 and opening a new bug for undo

Comment 12 Itamar Heim 2013-06-11 09:07:47 UTC
3.2 has been released

Comment 13 Itamar Heim 2013-06-11 09:07:49 UTC
3.2 has been released

Comment 14 Itamar Heim 2013-06-11 09:07:50 UTC
3.2 has been released

Comment 15 Itamar Heim 2013-06-11 09:36:24 UTC
3.2 has been released


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