Change in ovirt-engine[master]: core: Reimplement PKIResources.Resource as class

mperina at redhat.com mperina at redhat.com
Thu Jan 28 14:42:44 UTC 2016


Martin Peřina has submitted this change and it was merged.

Change subject: core: Reimplement PKIResources.Resource as class
......................................................................


core: Reimplement PKIResources.Resource as class

PKIResources.Resource was implemented as enum, but we used Config value
as a parameter for enum constructor. This caused troubles because enum
constructor was called during class loading but Config values are
initialized during Backend EJB initialization, so if some called
PKIResourceServlet to get certificate before Backend was initialized,
enum was initialized incorrectly and servlet returned error until JBoss
instance was restarted.

  1. Connection refused - before JBoss instance starts up
  2. 404 Not Found - JBoss instance is up, but engine application is
     not yet deployed
  3. 500 Internal Server Error - in server log there's our custom
     message describing that certificate is not available yet as engine
     startup hasn't been finished yet
  4. Success, certificate returned - JBoss instance is up, engine
     application fisnished initialization

Change-Id: If5fea4db033bddb5103cd412627e2506d5167a3d
Bug-Url: https://bugzilla.redhat.com/1294025
Signed-off-by: Martin Perina <mperina at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetCACertificateQuery.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/VdsDeployPKIUnit.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/hostdeploy/VdsDeployVmconsoleUnit.java
M backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/PKIResourceServlet.java
M backend/manager/modules/services/src/main/java/org/ovirt/engine/core/services/RegisterServlet.java
M backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/PKIResources.java
6 files changed, 71 insertions(+), 19 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5fea4db033bddb5103cd412627e2506d5167a3d
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Moti Asayag <masayag at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list