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

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@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/52870 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If5fea4db033bddb5103cd412627e2506d5167a3d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.6.3 Gerrit-Owner: Martin Peřina <mperina@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Peřina <mperina@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourfali@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski@gmail.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
piotr.kliczewski@gmail.com