Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 817589

Summary: ovirt-engine-backend: cannot find irs during ovf save after jboss restart in AddVmTemplateCommand will cause rollback and keep both vm and template in image locked
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: lpeer <lpeer>
Status: CLOSED NOTABUG QA Contact:
Severity: urgent Docs Contact:
Priority: medium    
Version: 3.1.0CC: dyasny, iheim, lpeer, ofrenkel, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-05-09 14:21:25 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
logs none

Description Dafna Ron 2012-04-30 15:04:05 UTC
Created attachment 581204 [details]
logs

Description of problem:

when creating a template from vm I restarted jboss. 
the task finished on vds and when jboss started polling started UpdateVMVDSCommand
will run to update ovf. 
for some reason (Michael said that it's probably a cache issue) we cannot locate IRS and we rollback. 
since the tasks have finished in both vds and backend vm and template will remain in image locked. 

I only encountered it for this specific scenario since I tested create and delete of volume and had no issues. 
 
Version-Release number of selected component (if applicable):

si2.1

How reproducible:

100%

Steps to Reproduce:
1. create a vm with preallocated+wipe disk 
2. create template -> restart jboss
3.
  
Actual results:

when jboss starts, although the task finished in both vds and backend we try to rollback. 

Expected results:

we should not rollback or complete rollback in both backend and vds 

Additional info: full logs

2012-04-30 17:45:23,497 ERROR [org.ovirt.engine.core.bll.EntityAsyncTask] (pool-10-thread-48) EntityAsyncTask::EndCommandAction [within thread]: EndAction for action type AddVmT
emplate threw an exception: org.ovirt.engine.core.common.errors.VdcBLLException: VdcBLLException: Cannot allocate IRS server
        at org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.handleVdsResult(VDSBrokerFrontendImpl.java:53) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VDSBrokerFrontendImpl.RunVdsCommand(VDSBrokerFrontendImpl.java:38) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmTemplateCommand.UpdateTemplateInSpm(VmTemplateCommand.java:228) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.VmTemplateCommand.UpdateTemplateInSpm(VmTemplateCommand.java:183) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.AddVmTemplateCommand.EndSuccessfully(AddVmTemplateCommand.java:379) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.InternalEndSuccessfully(CommandBase.java:454) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.endActionInTransactionScope(CommandBase.java:409) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:1132) [engine-bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInRequired(TransactionSupport.java:142) [engine-utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:109) [engine-utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.EndAction(CommandBase.java:355) [engine-bll.jar:]
        at org.ovirt.engine.core.bll.Backend.endAction(Backend.java:345) [engine-bll.jar:]
        at sun.reflect.GeneratedMethodAccessor94.invoke(Unknown Source) [:1.6.0_24]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
        at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]
        at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:7
2) [jboss-as-ee.jar:7.1.1.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.GeneratedMethodAccessor19.invoke(Unknown Source) [:1.6.0_24]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]
:

Comment 1 Omer Frenkel 2012-05-09 14:21:25 UTC
there is no rollback, 
there is an attempt to finish the tasks every 10 sec, but it fails because
there is no SPM.
once the SPM returns the command will finish and the locks will be released.
according to the log the pool didn't got back to up after the jboss restart, so
the tasks cant finish.