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/1302776
Signed-off-by: Martin Perina <mperina(a)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/VdsDeploy.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
5 files changed, 70 insertions(+), 18 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/52878
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.5
Gerrit-Owner: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>