Open percygrunwald opened 3 years ago
Looks as though this might be a bug specifically with the grafana-piechart-panel
plugin, as other plugins work as expected:
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-clock-panel 1.0.3
installing grafana-clock-panel @ 1.0.3
from: https://grafana.com/api/plugins/grafana-clock-panel/versions/1.0.3/download
into: /var/lib/grafana/plugins
✔ Installed grafana-clock-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.0.3
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-clock-panel 1.1.1
installing grafana-clock-panel @ 1.1.1
from: https://grafana.com/api/plugins/grafana-clock-panel/versions/1.1.1/download
into: /var/lib/grafana/plugins
✔ Installed grafana-clock-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
However, the grafana-piechart-panel
plugin behaves differently:
percy@usw401:~$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
percy@usw401:~$ sudo grafana-cli plugins install grafana-piechart-panel 1.6.1
installing grafana-piechart-panel @ 1.6.1
from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.6.1/download
into: /var/lib/grafana/plugins
✔ Installed grafana-piechart-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
percy@usw401:~$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
If I uninstall grafana-piechart-panel
then install version 1.6.1
I am able to downgrade to 1.4.0
, but not the reverse:
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins uninstall grafana-piechart-panel
Removing plugin: grafana-piechart-panel
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-piechart-panel 1.6.1
installing grafana-piechart-panel @ 1.6.1
from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.6.1/download
into: /var/lib/grafana/plugins
✔ Installed grafana-piechart-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.6.1
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-piechart-panel 1.4.0
installing grafana-piechart-panel @ 1.4.0
from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.4.0/download
into: /var/lib/grafana/plugins
✔ Installed grafana-piechart-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
Very strange indeed
Seems as though grafana-piechart-panel 1.6.1
is the source of the bug. I'm able to upgrade to 1.6.0
from 1.4.0
, but not to 1.6.1
from any version.
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.4.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-piechart-panel 1.6.0
installing grafana-piechart-panel @ 1.6.0
from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.6.0/download
into: /var/lib/grafana/plugins
✔ Installed grafana-piechart-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.6.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
$ sudo grafana-cli plugins install grafana-piechart-panel 1.6.1
installing grafana-piechart-panel @ 1.6.1
from: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.6.1/download
into: /var/lib/grafana/plugins
✔ Installed grafana-piechart-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
$ grafana-cli plugins ls
installed plugins:
goshposh-metaqueries-datasource @ 0.0.3
grafana-clock-panel @ 1.1.1
grafana-piechart-panel @ 1.6.0
natel-discrete-panel @ 0.1.0
Restart grafana after installing plugins . <service grafana-server restart>
Hello @percygrunwald! Thank you so much for doing the investigation. 🙏 I have transferred this issue directly to the Pie chart panel repo.
What happened: Currently installed plugins:
I attempted to update
grafana-piechart-panel
to version1.6.1
:However, the version of the plugin remains unchanged
grafana-piechart-panel
:What you expected to happen:
grafana-cli plugins install grafana-piechart-panel 1.6.1
should installgrafana-piechart-panel
with version1.6.1
. Nothing in the help content for this command gives any indication that a previously installed version of the plugin will affect its behavior.grafana-cli plugins update
does not give you the ability to specify a version to update to, so the only option islatest
. Given this, there is currently no way to update a specific plugin to a specific version without first uninstalling the plugin, which seems unnecessarily cumbersome.Our use case is automating management of our HA Grafana installation using Ansible's
grafana_plugin
module (which usesgrafana-cli plugins install
under the hood:Changing
grafana-cli
to be able to support this use case would also fix the Ansiblegrafana_plugin
module's behavior.The current workaround would be that we need to do the following steps in our Ansible code:
grafana-cli plugin ls
With the expected behavior, the logic simply becomes:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?: N/A
Environment:
Grafana CLI version 7.3.4
18.04.4 LTS (Bionic Beaver)
grafana-piechart-panel