Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-12920

[RH-SSO for OpenShift] [Templates] Increase the "timeoutSeconds" and "initialDelaySeconds" to overcome sclorg /postgresql-container issue #309

    Details

      Description

      See _ sclorg /postgresql-container _ issue #309 for details.

      In short, using RH-SSO PostgreSQL (persistent) templates with certain PVC storage providers (with low write throughput) results the PostgreSQL server initialization process (initdb) taking longer time, than the currently configured timeout in the PostgreSQL templates. When this happens, PostgreSQL pod is restarted yet sooner the required PostreSQL server DB initialization process has had chance to finish properly. Within 2nd PostgreSQL server start, the already running DB init process is detected, leading to not all the necessary phases of the DB init to be performed from the scratch. This results in the PostgreSQL DB server in the 2nd run to fail to start, because some of the prerequisites it to start properly wasn't met (the missing prerequisite might actually differ depending on the moment, in which the PostgreSQL DB init process was interrupted by the pod restart in the 1th run).

      Next, the 2nd attempt to start of the PostgreSQL server is terminated again, entering the never ending PostgreSQL pod restarts till the default OpenShift pod deployment timeout (10 mins IIRC) is reached, and the whole PostgreSQL deployment fails (followed by failing deployment of the RH-SSO for OpenShift pod, since it depends on the PostgreSQL one to be working / running correctly).

      The proposed fix is to increase the timeoutSeconds and initialDelaySeconds on the PostgreSQL probes, so (even in such an evironments), the PostreSQL server / pod has the chance to finish the necessary DB init phase correctly, and the neverending pod restart loop is not reached.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  iankko Ján Lieskovský
                  Reporter:
                  iankko Ján Lieskovský
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: