Bug 1484432 - Create template from HA VM with lease fails with SerializationException
Summary: Create template from HA VM with lease fails with SerializationException
Keywords:
Status: CLOSED DUPLICATE of bug 1481691
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage
Version: 4.2.0
Hardware: x86_64
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Allon Mureinik
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-23 14:54 UTC by Elad
Modified: 2017-08-27 08:35 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-08-23 15:34:48 UTC
oVirt Team: Storage
Embargoed:
ratamir: blocker?


Attachments (Terms of Use)
logs from engine and host (3.80 MB, application/x-gzip)
2017-08-23 14:54 UTC, Elad
no flags Details

Description Elad 2017-08-23 14:54:54 UTC
Created attachment 1317128 [details]
logs from engine and host

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


How reproducible:
Reproduces always during execution of https://polarion.engineering.redhat.com/polarion/redirect/project/RHEVM3/workitem?id=RHEVM-18216

Steps to Reproduce:
1. Create a VM with a disk and lease (NFS in my case, disk and lease on the same domain)
2. Start the VM
3. Power off the VM
4. Create a template from the VM with a disk on the same domain as the VM disk and lease

Actual results:
Template creation fails with the following exception in engine.log:

2017-08-23 17:37:00,887+03 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-18) [] Operation Failed: org.apache.commons.lang.SerializationException: org.c
odehaus.jackson.map.JsonMappingException: java.lang.Integer cannot be cast to java.lang.String (through reference chain: org.ovirt.engine.core.common.action.AddVmTemplateParameters["masterV
m"]->org.ovirt.engine.core.common.businessentities.VmStatic["leaseInfo"]->java.util.HashMap["offset"])
2017-08-23 17:37:00,887+03 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-18) [] Exception: javax.ejb.EJBException: org.apache.commons.lang.Serializatio
nException: org.codehaus.jackson.map.JsonMappingException: java.lang.Integer cannot be cast to java.lang.String (through reference chain: org.ovirt.engine.core.common.action.AddVmTemplatePa
rameters["masterVm"]->org.ovirt.engine.core.common.businessentities.VmStatic["leaseInfo"]->java.util.HashMap["offset"])
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInNoTx(CMTTxInterceptor.java:214) [wildfly-ejb3-11.0.0.Beta1.jar:11.0.0.Beta1]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInNoTx(CMTTxInterceptor.java:266) [wildfly-ejb3-11.0.0.Beta1.jar:11.0.0.Beta1]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.supports(CMTTxInterceptor.java:379) [wildfly-ejb3-11.0.0.Beta1.jar:11.0.0.Beta1]
        at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:244) [wildfly-ejb3-11.0.0.Beta1.jar:11.0.0.Beta1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:509)
        at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
        at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:89)
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
        at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [wildfly-ejb3-11.0.0.Beta1.jar:11.0.0.
Beta1]
        at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)




Create template task is not cleared, hence, the VM cannot be removed without ovirt-engine restart


Workaround:
Restart ovirt-engine in order to remove the VM

Expected results:
Template creation from HA VM with lease should succceed

Additional info:
logs from engine and host

Comment 1 Elad 2017-08-23 14:57:29 UTC
Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170822172135.git20a2fee.el7.centos.noarch
vdsm-4.20.2-104.git5f512b9.el7.centos.x86_64

Comment 2 Tal Nisan 2017-08-23 15:24:59 UTC
Arik, seems related to your latest changes to the leases (DOM XML), can you please have a look?

Comment 3 Arik 2017-08-23 15:34:48 UTC
Seems like the same problem as in bz 1481691

*** This bug has been marked as a duplicate of bug 1481691 ***

Comment 4 Elad 2017-08-23 15:44:36 UTC
I'll test again once https://gerrit.ovirt.org/#/c/80873/ and https://gerrit.ovirt.org/#/c/80872/ are merged.

Comment 5 Elad 2017-08-23 15:45:19 UTC
Setting need info for myself

Comment 6 Elad 2017-08-27 08:35:51 UTC
The fix of bz 1481691 indeed fixed the issue reported here.


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