Skip to content

Commit 8c63d93

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 d0fe5ab commit 8c63d93

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
@@ -72,6 +72,9 @@ grafana_default_volumes:
7272
- "kolla_logs:/var/log/kolla/"
7373
grafana_extra_volumes: "{{ default_extra_volumes }}"
7474

75+
grafana_start_first_node_delay: 10
76+
grafana_start_first_node_retries: 12
77+
7578
############
7679
# Prometheus
7780
############

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)