From 8866434590c18605fad866115b6ff40302590283 Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Fri, 30 Aug 2024 11:30:02 -0700 Subject: [PATCH] Increase db bootstrap timeouts Prevents service flapping while database is trying to recover --- core/grafana.nomad | 2 +- databases/lldap.nomad | 2 +- services/service/service_template.nomad | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/grafana.nomad b/core/grafana.nomad index fbdebd0..13b9fbf 100644 --- a/core/grafana.nomad +++ b/core/grafana.nomad @@ -86,7 +86,7 @@ EOF image = "mariadb:10" args = [ "/usr/bin/timeout", - "2m", + "20m", "/bin/bash", "-c", "until /usr/bin/mysql --defaults-extra-file=$${NOMAD_SECRETS_DIR}/my.cnf < $${NOMAD_SECRETS_DIR}/bootstrap.sql; do sleep 10; done", diff --git a/databases/lldap.nomad b/databases/lldap.nomad index 7e12ab9..07f631c 100644 --- a/databases/lldap.nomad +++ b/databases/lldap.nomad @@ -145,7 +145,7 @@ user = "{{ .user }}" image = "mariadb:10" args = [ "/usr/bin/timeout", - "2m", + "20m", "/bin/bash", "-c", "until /usr/bin/mysql --defaults-extra-file=$${NOMAD_SECRETS_DIR}/my.cnf < $${NOMAD_SECRETS_DIR}/bootstrap.sql; do sleep 10; done", diff --git a/services/service/service_template.nomad b/services/service/service_template.nomad index 6435b44..f25a726 100644 --- a/services/service/service_template.nomad +++ b/services/service/service_template.nomad @@ -255,7 +255,7 @@ EOF image = "mariadb:10" args = [ "/usr/bin/timeout", - "2m", + "20m", "/bin/bash", "-c", "until /usr/bin/mysql --defaults-extra-file=$${NOMAD_SECRETS_DIR}/my.cnf < $${NOMAD_SECRETS_DIR}/bootstrap.sql; do sleep 10; done", @@ -318,7 +318,7 @@ SELECT 'NOOP'; image = "postgres:14" args = [ "/usr/bin/timeout", - "2m", + "20m", "/bin/bash", "-c", "until /bin/bash $${NOMAD_TASK_DIR}/bootstrap.sh; do sleep 10; done",