Change in ovirt-engine[ovirt-engine-4.0]: core: Fix wrong db initialization

tnisan at redhat.com tnisan at redhat.com
Thu Jun 23 04:17:12 UTC 2016


Tal Nisan has submitted this change and it was merged.

Change subject: core: Fix wrong db initialization
......................................................................


core: Fix wrong db initialization

Before this patch, when pool got empty during its initialization, and
tried to write log about it into AuditLog, NPE was thrown, because
DbFacade wasn't initialized yet. Such NPE brought several singletons
down blocking ear from being deployed.

The reason for that is probably that there's a code using
org.ovirt.engine.core.dal.dbbroker.DbFacade#getInstance
which gets initialized only after DbFacade bean is properly constructed.
Injecting DbFacade into MacPoolPerCluster seems to fix the issue, since
DbFacade gets initialized during inject and thus getInstance will
return correct non-null instance when called.

Change-Id: I3e44d5da98b31f502252f9418a068cb509408d4d
Bug-Url: https://bugzilla.redhat.com/1343332
Signed-off-by: Martin Mucha <mmucha at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/macpool/MacPoolPerDc.java
2 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Martin Mucha: Verified
  Alona Kaplan: Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/59527
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e44d5da98b31f502252f9418a068cb509408d4d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-4.0
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list