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

alkaplan at redhat.com alkaplan at redhat.com
Mon Jun 20 08:50:55 UTC 2016


Alona Kaplan 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/MacPoolPerCluster.java
2 files changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Martin Peřina: Looks good to me, but someone else must approve
  Martin Mucha: Verified
  Alona Kaplan: Looks good to me, approved; Passed CI tests
  Moti Asayag: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e44d5da98b31f502252f9418a068cb509408d4d
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Roy Golan <rgolan at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list