grafana / mqtt-datasource

MQTT Datasource for Grafana allows streaming data from any MQTT broker running either locally or remotely.
Apache License 2.0
168 stars 49 forks source link

Bug with plugin when mapping docker volume on external drive for /var/lib/grafana #81

Open jenshenk opened 1 year ago

jenshenk commented 1 year ago

I ran into an interesting but confusing issue, most likely not uniquely connected to mqtt-datasource but to plugins in general

I'm using grafana 10.0.1 on a raspberry pi with docker and wanted the docker db reside on an external drive, Here's what's happening:

Interestingly, when I map a docker volume that's on the SD card Docker and RaspiOS is running from the plugin gets installed and can be used without issues.

In another attempt I did the following, which might lead to fixing this bug

Troubleshooting a bit more I found out that if I stop the container and unmount the external drive, the _data directory of the the mapped docker volume for /var/lib/grafana is empty, what makes sense. Where it becomes really interesting is that in the volumes directory from docker I now see a directory called grafanadataplugins that somehow was created by grafana and that remains having files when the external drive is unmounted. The plugins volume I specifically created and mapped for the plugins directory however was called grafanaplugins without the "data" in the name and that one is not being used.

I think the bug somehow revolves around the plugins directory being a subdirectory of the /var/lib/grafana directory and hope the above info helps to fix this issue.