Description of problem: When having a VM with a snapshot that contains fewer disks then the active-snapshot an exception is thrown and the operation failed Version-Release number of selected component (if applicable): master-4.3.0 - from commit 56af10f17ad1ed06611c99abec486fe03e91dd3e How reproducible: 100% Steps to Reproduce: 1. Create a VM with disk 2. Create a snapshot of the VM from step 1 3. Add another disk to the VM 4. Try to create a template from the snapshot in step 2 Actual results: An exception is thrown Expected results: The template should create successfully Additional info: Part of the engine log- 2018-05-01 10:37:08,444+03 ERROR [org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand] (default task-59) [6bf12d96-0ba7-4dee-abdb-a47cfe45907f] Transaction rolled-back for command 'org.ovirt.engine.core.bll.storage.disk.image.CreateImageTemplateCommand'. 2018-05-01 10:37:08,444+03 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (default task-59) [6bf12d96-0ba7-4dee-abdb-a47cfe45907f] transaction rolled back 2018-05-01 10:37:08,445+03 ERROR [org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand] (default task-59) [6bf12d96-0ba7-4dee-abdb-a47cfe45907f] Command 'org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand' failed: 1 2018-05-01 10:37:08,445+03 ERROR [org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksFromSnapshotCommand] (default task-59) [6bf12d96-0ba7-4dee-abdb-a47cfe45907f] Exception: java.lang.ArrayIndexOutOfBoundsException: 1 at org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksCommand.addVmTemplateImage(CreateAllTemplateDisksCommand.java:134) [bll.jar:] at org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksCommand.lambda$addVmTemplateImages$1(CreateAllTemplateDisksCommand.java:129) [bll.jar:] at java.util.ArrayList.forEach(ArrayList.java:1257) [rt.jar:1.8.0_161] at org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksCommand.addVmTemplateImages(CreateAllTemplateDisksCommand.java:129) [bll.jar:] at org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksCommand.lambda$executeCommand$0(CreateAllTemplateDisksCommand.java:83) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [utils.jar:] at org.ovirt.engine.core.bll.storage.disk.CreateAllTemplateDisksCommand.executeCommand(CreateAllTemplateDisksCommand.java:82) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1133) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1286) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1935) [bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:] at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1346) [bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:400) [bll.jar:] at org.ovirt.engine.core.bll.executor.DefaultBackendActionExecutor.execute(DefaultBackendActionExecutor.java:13) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:450) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runActionImpl(Backend.java:432) [bll.jar:] at org.ovirt.engine.core.bll.Backend.runInternalAction(Backend.java:638) [bll.jar:] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_161] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509) at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.delegateInterception(Jsr299BindingsInterceptor.java:78) at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:88) at org.jboss.as.weld.interceptors.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:101) at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-11.0.0.Final.jar:11.0.0.Final]
Description of problem: When having a VM with a snapshot that contains fewer disks then the active-snapshot, an exception is thrown when trying to create a template from the snapshot and the operation failed.
Eyal, does that reproduce in 4.2.z as well?
(In reply to Tal Nisan from comment #2) > Eyal, does that reproduce in 4.2.z as well? I didn't check but I am pretty sure that this is reproduced also in 4.2.z according to the fix.
Steps to Reproduce: 1. Create a VM with disk 2. Create a snapshot of the VM from step 1 3. Add another disk to the VM 4. Try to create a template from the snapshot in step 2 Result: Template is being created successfully. Used: ovirt-engine-4.3.0-0.0.master.20180815091554.gitd5455ea.el7.noarch
Same issue for ovirt-engine-4.2.
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.7 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.
Closed by mistake, moving back to qa -> verified
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019. Since the problem described in this bug report should be resolved in oVirt 4.3.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.