From 1655e74faf331d0f002d1d9206eb7cca51edc333 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Mon, 9 Apr 2018 12:53:27 +0200 Subject: [PATCH] TT#26264 Check for empty grafana.db Grafana will consider the database to be R/O if it's an empty file, and refuse to start. Check for this condition. Change-Id: Iad2f1ed4fb03370432d438c4dcd3bab342ac2588 (cherry picked from commit c0639f36b6bfb1a6d3b40fe40199838e3d44865a) --- templates/911_service-grafana.yaml.tt2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/templates/911_service-grafana.yaml.tt2 b/templates/911_service-grafana.yaml.tt2 index 0f80efa..a6b7b67 100644 --- a/templates/911_service-grafana.yaml.tt2 +++ b/templates/911_service-grafana.yaml.tt2 @@ -12,6 +12,14 @@ is_li_enabled = is_li && cluster_sets.type == 'distributed' && intercept.enable == 'yes'; -%] +file: + + /var/lib/grafana/grafana.db: + exists: true + filetype: file + size: + not: 0 + command: [% IF grafana.enable == 'yes' && (is_mgmt || is_li_enabled) -%]