This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 873595 - engine: NPE when previewing a snapshot created with no disks after adding a disk
engine: NPE when previewing a snapshot created with no disks after adding a disk
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
x86_64 Linux
high Severity high
: ---
: 3.2.0
Assigned To: Liron Aravot
Dafna Ron
: Regression
Depends On:
Blocks: 915537
  Show dependency treegraph
Reported: 2012-11-06 04:35 EST by Dafna Ron
Modified: 2016-02-10 11:57 EST (History)
9 users (show)

See Also:
Fixed In Version: sf3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Dafna Ron 2012-11-06 04:35:34 EST
Created attachment 639223 [details]

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):


How reproducible:


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-/ [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-/ [26d40812] Command org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand throw exception: java.lang.NullPointerExce
        at org.ovirt.engine.core.utils.ovf.OvfWriter.BuildDisk( [engine-utils.jar:]
        at org.ovirt.engine.core.utils.ovf.OvfManager.BuildOvf( [engine-utils.jar:]
        at org.ovirt.engine.core.utils.ovf.OvfManager.ExportVm( [engine-utils.jar:]
        at org.ovirt.engine.core.bll.VmCommand.UpdateVmInSpm( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.UpdateVmInSpm( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.restoreVmConfigFromSnapshot( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.TryBackToAllSnapshotsOfVmCommand.ExecuteVmCommand( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmCommand.executeCommand( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction( [engine-bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed( [engine-utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope( [engine-utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runActionImpl( [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.RunAction( [engine-bll.jar:]
        at sun.reflect.GeneratedMethodAccessor276.invoke(Unknown Source) [:1.7.0_09-icedtea]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( [rt.jar:1.7.0_09-icedtea]
        at java.lang.reflect.Method.invoke( [rt.jar:1.7.0_09-icedtea]
        at$ManagedReferenceMethodInterceptor.processInvocation( [jboss-as-ee.jar:7.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed( [jboss-invocation.jar:1.1.1.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext$Invocation.proceed( [jboss-invocation.jar:1.1.1.Final-redhat-1]
        at org.ovirt.engine.core.utils.ThreadLocalSessionCleanerInterceptor.injectWebContextToThreadLocal( [engine-utils.jar:]
        at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source) [:1.7.0_09-icedtea]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( [rt.jar:1.7.0_09-icedtea]
        at java.lang.reflect.Method.invoke( [rt.jar:1.7.0_09-icedtea]
        at$ManagedReferenceLifecycleMethodInterceptor.processInvocation( [jboss-as-ee.jar:7.1.2.Final-redhat-1]
        at org.jboss.invocation.InterceptorContext.proceed( [jboss-invocation.jar:1.1.1.Final-redhat-1]
Comment 4 Liron Aravot 2012-11-07 10:16:14 EST
Why is it marked as regression? when did it work for snapshots without disks?
Comment 5 Dafna Ron 2012-11-07 11:02:56 EST
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 04:05:07 EST
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 04:09:47 EST
(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?

Comment 8 Liron Aravot 2012-11-08 12:21:47 EST
Comment 9 mkublin 2012-11-14 08:14:57 EST
The commit was reverted, because of causing performance regression at transaction manager.

Change of revert:
Comment 10 Ayal Baron 2012-12-25 09:42:10 EST
Reintroduced upstream, change id: I5c9fd926e61e860f4af9ff460c6657cf81b1fc85
Comment 11 Dafna Ron 2013-01-07 11:58:08 EST
preview works but undo has a java.lang.IndexOutOfB
verifying this bug for sf3 and opening a new bug for undo
Comment 12 Itamar Heim 2013-06-11 05:07:47 EDT
3.2 has been released
Comment 13 Itamar Heim 2013-06-11 05:07:49 EDT
3.2 has been released
Comment 14 Itamar Heim 2013-06-11 05:07:50 EDT
3.2 has been released
Comment 15 Itamar Heim 2013-06-11 05:36:24 EDT
3.2 has been released

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