-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
TEMPLATE 1.4.10.GA
-
Interactive Demo/Tutorial, User Experience
-
-
-
-
-
-
CLOUD Maintenance Sprint 28
When using a persistent storage, RH-SSO pod often needs 2-3 restarts till the DB becomes reachable to utilize the services of the MySQL / PostgreSQL DB properly. See details.
The proposal is to use OpenShift init containers to achieve proper pod starting sequence control (ensure RH-SSO pod is started only in moment related MySQL / PostgreSQL pod is able to receive JDBC connections already):
The proposed fix (recognized as working properly for MySQL DB case, needs to be tested for PostgreSQL's DB case yet) is as follows:
@@ -488,6 +488,23 @@ }, "spec": { "terminationGracePeriodSeconds": 75, + "initContainers": [ + { + "name": "wait-for-${APPLICATION_NAME}-mysql", + "image": "busybox", + "command": [ + "sh", + "-c", + "until nc -w 3 -z ${SVC} 3306; do echo waiting for ${SVC} to become available ; sleep 7 ; done" + ], + "env": [ + { + "name": "SVC", + "value": "${APPLICATION_NAME}-mysql" + } + ] + } + ], "containers": [ { "name": "${APPLICATION_NAME}",