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

piotr.kliczewski at gmail.com piotr.kliczewski at gmail.com
Thu Jan 28 20:29:36 UTC 2016


Piotr Kliczewski 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
  Jenkins CI: Passed CI tests
  Oved Ourfali: Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5fea4db033bddb5103cd412627e2506d5167a3d
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.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