openstack-helm-infra/grafana/templates
Markin, Sergiy 00846e2e02 [grafana] Migrator job is mariadb-fail-proof
The main goal of this PS is to make sure the migrator can complete the migrations even if mariadb galera cluster dropped the migrator connection leaving the database in inconsistent state. It may happen that migration_log has a record of a successfully performed migration while the database scheme misses an entity so any further attempts to re-run the migrator fail because of missed entity the migrator expects to be present.

Also the migrator is running mariadb image as a main one and grafana binaries are mounted as /usr/share/grafana. Migrator job container is running under nobody user uid.

This PS runs migrator in a safe way:
- prepares database backup
- runs a single instance of grafana as migrator with log file as a background process in a loop
- constantly checks the log file in the main process
- in case of the migrations completed it stops grafana-server process and completed the job
- in case of a migration error it restores the previously prepared backup so the grafana-server that is running in a background loop can re-try the migration
- the database operations are prefixed with code that makes sure the database is reachable.

Change-Id: I4e1542b62777f25c08ddd2cb74f0a0e7bfea5145
2023-01-05 10:27:37 -06:00
..
bin [grafana] Migrator job is mariadb-fail-proof 2023-01-05 10:27:37 -06:00
secrets [grafana] Migrator job is mariadb-fail-proof 2023-01-05 10:27:37 -06:00
configmap-bin.yaml [Update] Grafana: Provision any dashboard as homepage 2021-02-24 09:28:15 -06:00
configmap-dashboards.yaml Added Grafana iDRAC dashboard 2021-11-10 21:04:23 +00:00
configmap-etc.yaml Enable TLS for grafana 2021-03-01 12:21:31 -08:00
deployment.yaml Grafana 8.5.10 with unified alerting 2022-09-08 10:40:27 -04:00
ingress-grafana.yaml Secure ingress path for Grafana and Kibana 2021-05-12 08:50:28 -07:00
job-db-init-session.yaml Helm 3 - Fix Job labels 2021-09-30 16:01:31 -05:00
job-db-init.yaml Helm 3 - Fix Job labels 2021-09-30 16:01:31 -05:00
job-db-session-sync.yaml Helm 3 - Fix Job labels 2021-09-30 16:01:31 -05:00
job-image-repo-sync.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
job-run-migrator.yaml [grafana] Migrator job is mariadb-fail-proof 2023-01-05 10:27:37 -06:00
job-set-admin-user.yaml Helm 3 - Fix Job labels 2021-09-30 16:01:31 -05:00
network_policy.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
pod-helm-tests.yaml Undo octal-values restriction together with corresponding code 2020-07-07 15:42:53 +00:00
secret-admin-creds.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-db-session.yaml Enable TLS for grafana 2021-03-01 12:21:31 -08:00
secret-db.yaml [grafana] Migrator job is mariadb-fail-proof 2023-01-05 10:27:37 -06:00
secret-ingress-tls.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-prom-creds.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
secret-registry.yaml support image registries with authentication 2022-07-20 14:28:47 -05:00
service-ingress.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00
service.yaml Remove OSH Authors copyright 2020-05-07 02:11:15 +00:00