/var/lib/grafana is mounted as a docker volume causing new plugins not to show up

Bug #2039498 reported by Dawud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Dawud

Bug Description

In `ansible/roles/grafana/defaults/main.yml` these are the volumes we mount into the container:

```
grafana_default_volumes:
  - "{{ node_config_directory }}/grafana/:{{ container_config_directory }}/:ro"
  - "/etc/localtime:/etc/localtime:ro"
  - "{{ '/etc/timezone:/etc/timezone:ro' if ansible_facts.os_family == 'Debian' else '' }}"
  - "grafana:/var/lib/grafana/"
  - "kolla_logs:/var/log/kolla/"

The problem with mounting the grafana:/var/lib/grafana volume is that the plug-ins folder exists inside of /var/lib/grafana. This means that after the initial install of grafana, any additional plug-ins installed at build time (Like the recent addition of the opensearch plug-in) are not detected by grafana as the grafana volume is mounted and replaces the contents of /var/lib/grafana (where the plug-ins directory is located). For additional plugins to be installed, they would need to be added to the `grafana` docker volume either manually or by using the grafana-cli after starting the container.

This can be fixed by either 1) removing the need for the grafana volume (as dashboards are loaded as code and stored in the database) or 2) Narrowing down the mountpoint of the grafana volumes to something like `/var/lib/grafana/dashboards`

Dawud (dawudm)
Changed in kolla-ansible:
assignee: nobody → Dawud (dawudm)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.