Bug 813159

Summary: Failure in compensation on start-up may cause Backend EJB not to load
Product: [Retired] oVirt Reporter: Mike Kolesnik <mkolesni>
Component: ovirt-engine-coreAssignee: Mike Kolesnik <mkolesni>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: acathrow, dyasny, iheim, lpeer, mgoldboi, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-09 08:06:11 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:

Description Mike Kolesnik 2012-04-17 06:11:28 UTC
Description of problem:
This error occurred due to missing entity to DAO mapping for permissions entity:

2012-04-11 09:54:26,882 ERROR[org.jboss.ejb3.service.ServiceContainer] Encountered an error in start
of Backend
java.lang.RuntimeException: java.lang.NullPointerException
[..]
Caused by: java.lang.NullPointerException
    at
java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:782)
    at org.ovirt.engine.core.dao.DaoFactory.get(DaoFactory.java:19)
    at
org.ovirt.engine.core.dal.dbbroker.DbFacade.getDAO(DbFacade.java:164)
    at
org.ovirt.engine.core.dal.dbbroker.DbFacade.getDaoForEntity(DbFacade.java:160)
    at
org.ovirt.engine.core.bll.CommandBase$1.runInTransaction(CommandBase.java:252)
    at
org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204)
    at
org.ovirt.engine.core.bll.CommandBase.compensate(CommandBase.java:232)
    at org.ovirt.engine.core.bll.Backend.compensate(Backend.java:218)
    at org.ovirt.engine.core.bll.Backend.Initialize(Backend.java:149)


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


How reproducible:
Always


Steps to Reproduce:
Remove entity to DAO mapping, and have a compensation that needs to perform on startup with this entity (restart the jboss during an operation).
  
Actual results:
Engine-core fails to start


Expected results:
Engine-core should start anyway, and log the exception to logs


Additional info:

Comment 1 Mike Kolesnik 2012-05-09 11:14:49 UTC
Sent patch to gerrit: http://gerrit.ovirt.org/4251

Comment 2 Mike Kolesnik 2012-05-10 05:26:34 UTC
Merged to upstream, commit ac167e832450358c2502d5b8064c7aa155caad8d: http://gerrit.ovirt.org/gitweb?p=ovirt-engine.git;a=commit;h=ac167e832450358c2502d5b8064c7aa155caad8d

Comment 3 Itamar Heim 2012-08-09 08:06:11 UTC
closing ON_QA bugs as oVirt 3.1 was released:
http://www.ovirt.org/get-ovirt/