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

mariadb-init config job reports success although db_init.sh fails

XMLWordPrintable

    • Hide

      SUMMARY

      Components using common mariadb-init job to create DB and User in a MariaDB (e.g. mariadb-galera).

      The creation is done using a script (https://git.onap.org/oom/tree/kubernetes/common/mariadb-init/resources/config/db_init.sh)

      If the execution fails, as the DB is not fully up, the script does not report the error and the config job will not be re-executed and the component startu fails.
      This happened e.g. for NBI, see log:

       

      root@onap-onap-hs-nfs:~# kubectl logs onap-nbi-config-config-job-sw2vr -n onap
      Creating database nbi and user rene...
      ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ZunaJixp'' at line 1
      ERROR 1133 (28000) at line 1: Can't find any matching row in the user table
      Created database nbi and user rene.
      

       

      OS / ENVIRONMENT

      • 12 node cluster,
      • RKE 1.0.6
      • Helm 2.16.6
      • K8s v1.15.11

      OOM VERSION

      • Frankfurt OOM release

      STEPS TO REPRODUCE

      helm deploy onap local/onap --values ~/oom/kubernetes/onap/resources/overrides/onap-all.yaml --values ~/oom/kubernetes/onap/resources/overrides/environment.yaml --values ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml --values ~/integration-override.yaml --namespace onap --verbose

      EXPECTED RESULTS

      • nbi healtcheck OK
      • nbi pods running

      ACTUAL RESULTS

      root@onap-onap-hs-nfs:~/oom/kubernetes/nbi/templates# kubectl get pods -n onap|grep nbi
      onap-nbi-588b6cc599-n64dc 0/1 CrashLoopBackOff 36 175m
      onap-nbi-config-config-job-sw2vr 0/1 Completed 0 175m
      onap-nbi-mongo-0 1/1 Running 0 175m

      Healtchec fails...

      Show
      SUMMARY Components using common mariadb-init job to create DB and User in a MariaDB (e.g. mariadb-galera). The creation is done using a script ( https://git.onap.org/oom/tree/kubernetes/common/mariadb-init/resources/config/db_init.sh ) If the execution fails, as the DB is not fully up, the script does not report the error and the config job will not be re-executed and the component startu fails. This happened e.g. for NBI, see log:   root@onap-onap-hs-nfs:~# kubectl logs onap-nbi-config-config-job-sw2vr -n onap Creating database nbi and user rene... ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ZunaJixp' ' at line 1 ERROR 1133 (28000) at line 1: Can't find any matching row in the user table Created database nbi and user rene.   OS / ENVIRONMENT 12 node cluster, RKE 1.0.6 Helm 2.16.6 K8s v1.15.11 OOM VERSION Frankfurt OOM release STEPS TO REPRODUCE helm deploy onap local/onap --values ~/oom/kubernetes/onap/resources/overrides/onap-all.yaml --values ~/oom/kubernetes/onap/resources/overrides/environment.yaml --values ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml --values ~/integration-override.yaml --namespace onap --verbose EXPECTED RESULTS nbi healtcheck OK nbi pods running ACTUAL RESULTS root@onap-onap-hs-nfs:~/oom/kubernetes/nbi/templates# kubectl get pods -n onap|grep nbi onap-nbi-588b6cc599-n64dc 0/1 CrashLoopBackOff 36 175m onap-nbi-config-config-job-sw2vr 0/1 Completed 0 175m onap-nbi-mongo-0 1/1 Running 0 175m Healtchec fails...

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

            Created:
            Updated:
            Resolved: