Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-3280

Readiness checks can fail in DB jobs and Deployments

XMLWordPrintable

    • Hide

      Readiness Jobs in DB-Init jobs should make sure, that the DB is up and running, before the job is started.
      Current ReadinessCheck offers the check options:

      • containers (check the container name inside pod)
      • pods (check the pod name)
      • apps (check pods with the given "app" label)

      Usually this works well.
      But in case e.g. mariadb-operator created DBs it fails, as the operator starts a job prior to the STS with the actual DB. But job and STS pod use the same "app" label.

      As the DB job ReadinessProbe use the "app" label option, the job gets started too fast and kills the DB initialisation.

      There are 2 options:

       

      Show
      Readiness Jobs in DB-Init jobs should make sure, that the DB is up and running, before the job is started. Current ReadinessCheck offers the check options: containers (check the container name inside pod) pods (check the pod name) apps (check pods with the given "app" label) Usually this works well. But in case e.g. mariadb-operator created DBs it fails, as the operator starts a job prior to the STS with the actual DB. But job and STS pod use the same "app" label. As the DB job ReadinessProbe use the "app" label option, the job gets started too fast and kills the DB initialisation. There are 2 options: use the "pod" option and select the STS pod name (e.g. so-db-0) enhance the ReadinessCheck to check for the status of a service see:  https://github.com/kubernetes-client/python/issues/2133 https://stackoverflow.com/questions/51058401/get-service-selectors-with-k8s-python-client/51073360#51073360  

          andreasgeissler Andreas Geissler
          andreasgeissler Andreas Geissler
          Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

            Created:
            Updated:
            Resolved: