Skip to content

Commit d7ebe7c

Browse files
osfrickleryoctozepto
authored andcommitted
Bump timeout for grafana startup
The initial migrations when starting grafana for the first time may sometimes take much longer than 20s, we have seen samples up to near 60s. Allow 120s to have some margin. Also make the timeout parameters configurable. Closes-Bug: 1769962 Signed-off-by: Dr. Jens Harbott <[email protected]> Change-Id: If9186d8aa65150c492657550064789e211dbb570 (cherry picked from commit f8f34e0)
1 parent 69810fd commit d7ebe7c

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ansible/roles/grafana/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ grafana_default_volumes:
8181
- "kolla_logs:/var/log/kolla/"
8282
grafana_extra_volumes: "{{ default_extra_volumes }}"
8383

84+
grafana_start_first_node_delay: 10
85+
grafana_start_first_node_retries: 12
86+
8487
############
8588
# Prometheus
8689
############

ansible/roles/grafana/handlers/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
status_code: 200
3030
register: result
3131
until: result.get('status') == 200
32-
retries: 10
33-
delay: 2
32+
retries: "{{ grafana_start_first_node_retries }}"
33+
delay: "{{ grafana_start_first_node_delay }}"
3434
when:
3535
- kolla_action != "config"
3636
- inventory_hostname == groups[service.group]|first
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
fixes:
3+
- |
4+
On slower nodes, the initial grafana startup could experience a
5+
timeout failure when the migrations for setting up the database
6+
took longer than expected. This has been fixed by increasing the
7+
default timeout. The timeout settings can be changed via new
8+
parameters ``grafana_start_first_node_delay`` and
9+
``grafana_start_first_node_retries`` for the ``grafana`` role.
10+
`LP#1769962 <https://launchpad.net/bugs/1769962>`__

0 commit comments

Comments
 (0)