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

grafana_plugin with offline .zip package fails #45

Closed
rockaut opened this issue Feb 4, 2020 · 0 comments · Fixed by #46
Closed

grafana_plugin with offline .zip package fails #45

rockaut opened this issue Feb 4, 2020 · 0 comments · Fixed by #46

Comments

@rockaut
Copy link
Contributor

rockaut commented Feb 4, 2020

SUMMARY

If using an offline .zip package for plugin installation the command fails while the plugin is actually installed correctly.

See ansible issue ansible/ansible#67042

ISSUE TYPE
  • Bug Report
COMPONENT NAME

grafana_plugin

ANSIBLE VERSION
ansible 2.9.4
  config file = /mnt/d/Code/gitlab/poi-central-grafana/ansbile/ansible.cfg
  configured module search path = ['/home/fism/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /mnt/d/Code/gitlab/grafana/venv/lib/python3.6/site-packages/ansible
  executable location = /mnt/d/Code/gitlab/grafana/venv/bin/ansible
  python version = 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0]
OS / ENVIRONMENT

Grafana 6.6.0 on RHEL7

STEPS TO REPRODUCE
tasks:
    - name: Install/update zabbix plugin
      become: yes
      grafana_plugin:
        name: alexanderzobnin-grafana-zabbix
        grafana_plugin_url: "/tmp/alexanderzobnin-grafana-zabbix-v3.10.5-1-g2219691.zip"
        state: present

Running this task results in the error seen below while grafana-cli ls reports:

installed plugins:
alexanderzobnin-zabbix-app @ 3.10.5

Restart grafana after installing plugins . <service grafana-server restart>

Also tried to manually execute the command the module is triggering:
/sbin/grafana-cli --pluginUrl /tmp/alexanderzobnin-grafana-zabbix-v3.10.5-1-g2219691.zip plugins install alexanderzobnin-grafana-zabbix

Which results in:

installing alexanderzobnin-grafana-zabbix @
from: /tmp/alexanderzobnin-grafana-zabbix-v3.10.5-1-g2219691.zip
into: /var/lib/grafana/plugins

✔ Installed alexanderzobnin-grafana-zabbix successfully

Restart grafana after installing plugins . <service grafana-server restart>
EXPECTED RESULTS

as the plugin is correctly installing the plugin it should report a success.

ACTUAL RESULTS

Module error:

The full traceback is:
WARNING: The below traceback may *not* be related to the actual failure.
  File "/tmp/ansible_grafana_plugin_payload_39EwDA/ansible_grafana_plugin_payload.zip/ansible/modules/monitoring/grafana_plugin.py", line 236, in main
  File "/tmp/ansible_grafana_plugin_payload_39EwDA/ansible_grafana_plugin_payload.zip/ansible/modules/monitoring/grafana_plugin.py", line 210, in grafana_plugin

fatal: [****]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "grafana_plugin_url": "/tmp/alexanderzobnin-grafana-zabbix-v3.10.5-1-g2219691.zip",
            "grafana_plugins_dir": null,
            "grafana_repo": null,
            "name": "alexanderzobnin-grafana-zabbix",
            "state": "present",
            "version": null
        }
    },
    "msg": "<type 'exceptions.ValueError'> : need more than 1 value to unpack "
}
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

Successfully merging a pull request may close this issue.

1 participant