Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jenshenk opened this issue Jun 29, 2023 · 0 comments

Comments

@jenshenk
Copy link

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:

  • created a volume on the external drive
  • mapped that volume to /var/lib/grafana when starting docker
  • grafana uses that volume and is able to install the mqtt plugin
  • on trying to use the mqtt plugin I get the "plugin unavailable error.

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

  • Created a docker volume for /var/lib/grafana
  • Created another docker volume for /var/lib/grafana/plugin
  • Mapped both volumes to being used as data and plugins directory respectively
  • Grafana is using the mapped volume /var/lib/grafana, HOWEVER the directory of the mapped volume for /var/lib/grafana/plugins remains empty
  • Yet, grafana is able to install the plugin and use it without issues

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant