Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

WTF bug with grafana_dashboards_dir == dashboards #136

Closed
amarao opened this issue Feb 6, 2019 · 4 comments
Closed

WTF bug with grafana_dashboards_dir == dashboards #136

amarao opened this issue Feb 6, 2019 · 4 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@amarao
Copy link
Contributor

amarao commented Feb 6, 2019

If grafana_dashboards_dir is set to dashboards fileglob finds roles/cloudalchemy.grafana/files/dashboards and ignores all other folders in the playbook directory.

It cause some big WTF as grafana_dashboards_dir=myboards will loads dashboards from it (f.e. myproject/dashboards (with the role inside myproject/roles/cloudalchemy.grafana)), and grafana_dashboards_dir=dashboards won't find anything because it finds myproject/roles/cloudalchemy.grafana/files/dashboards and stops there instead of looking into myproject/dashboards.

I think it should be noted in documentation (defaults/main.yaml), or, better, to be fixed work with 'dashboards' name.

@paulfantom paulfantom added bug Something isn't working help wanted Extra attention is needed labels Feb 6, 2019
@paulfantom
Copy link
Member

Could you test what would happen if we remove cloudalchemy.grafana/files/dashboards directory from this role?

@amarao
Copy link
Contributor Author

amarao commented Feb 7, 2019

Hello. If I do rm -r cloudalchemy.grafana/files/dashboards it allows to use my own 'dashboards' playbook directory (as expected).

I checked the second scenario: no cloudalchemy.grafana/files/dashboards, no dashboards in role, grafana_dashboards_dir is not modified (default value from role defaults), it works fine, but with warning:

TASK [cloudalchemy.grafana : Set the correct data source name in the dashboard] *************************************************************************************************************
 [WARNING]: Unable to find 'dashboards' in expected paths (use -vvvvv to see paths)

@paulfantom
Copy link
Member

Then I think we should remove files directory. Could you create a PR? :)

amarao added a commit to amarao/ansible-grafana that referenced this issue Feb 7, 2019
It cause wrong fileglob lookup. If user wants to use own
'dashboards' directory, fileglob with stuck to files/dashboards
and find nothing.

Closes: cloudalchemy#136
paulfantom pushed a commit that referenced this issue Feb 7, 2019
It cause wrong fileglob lookup. If user wants to use own
'dashboards' directory, fileglob with stuck to files/dashboards
and find nothing.

Closes: #136
@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
cosandr pushed a commit to cosandr/ansible-grafana that referenced this issue Aug 12, 2020
It cause wrong fileglob lookup. If user wants to use own
'dashboards' directory, fileglob with stuck to files/dashboards
and find nothing.

Closes: cloudalchemy#136
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants