Bug 892724

Summary: engine: java.lang.IndexOutOfB oundsException for undo/commit of preview on snapshot with no disks
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Liron Aravot <laravot>
Status: CLOSED ERRATA QA Contact: Dafna Ron <dron>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: abaron, dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage
Fixed In Version: SF6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 21:32:09 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:
Attachments:
Description Flags
log none

Description Dafna Ron 2013-01-07 17:04:49 UTC
Created attachment 674173 [details]
log

Description of problem:

we are getting a java.lang.IndexOutOfBoundsException when trying to commit/undo a snapshot preview for a vm with no disks. 

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

sf3

How reproducible:

100%

Steps to Reproduce:
1. create a vm with no disks 
2. create a snapshot -> preview
3. try to commit/undo the snapshot
  
Actual results:

we get java.lang.IndexOutOfBoundsException

Expected results:

we should be able to commit/undo a snapshot with no disks

Additional info: full log attached

2013-01-07 18:54:28,223 INFO  [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (ajp-/127.0.0.1:8702-11) [41dc8171] Lock Acquired to object EngineLock [exclusiveLocks= key
: e2d743c2-ed23-469e-80e8-de4cffaf581f value: VM
, sharedLocks= ]
2013-01-07 18:54:28,231 ERROR [org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand] (ajp-/127.0.0.1:8702-11) [41dc8171] Error during CanDoActionFailure.: java.lang.IndexOutOfB
oundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:604) [rt.jar:1.7.0_09-icedtea]
        at java.util.ArrayList.get(ArrayList.java:382) [rt.jar:1.7.0_09-icedtea]
        at org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand.getQuotaStorageConsumptionParameters(RestoreAllSnapshotsCommand.java:359) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.getQuotaConsumptionParameters(CommandBase.java:568) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.internalValidateAndSetQuota(CommandBase.java:651) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.internalCanDoAction(CommandBase.java:618) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:298) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:358) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.RunAction(Backend.java:304) [engine-bll.jar:]
        at sun.reflect.GeneratedMethodAccessor180.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.GeneratedMethodAccessor30.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.3.Final-redhat-4]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation.jar:1.1.1.Final-redhat-2]
:

Comment 2 Liron Aravot 2013-01-10 15:32:34 UTC
http://gerrit.ovirt.org/#/c/10871/

Comment 3 Dafna Ron 2013-02-07 16:55:24 UTC
verified on sf6

Comment 4 errata-xmlrpc 2013-06-10 21:32:09 UTC
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