a13m / openshift-zabbix-cartridge

Zabbix server cartridge
Other
5 stars 4 forks source link

post_install script install the wrong zabbixapi gem #4

Closed LudoMeurillon closed 10 years ago

LudoMeurillon commented 10 years ago

Post install script is doing a

oo-exec-ruby gem install zabbixapi

without specifying any versions.

In some cases (maybe all?), it install the latest zabbixapi version (2.2.0) and this version doesn't support zabbix server installed with the cartridge.

The version of zabbixapi should be explicitly defined in the script (or in a Gemfile ?)

Hellaenergy commented 10 years ago

Good catch LudoMeurillon. I ran into this issue as well when trying to add hosts like so:

$ rhc ssh zabbix "zabbix-add-host your.host.dom" /var/lib/openshift/538797de250a1d45b400018c/.gem/gems/zabbixapi-2.2.0/lib/zabbixapi.rb:45:in initialize': Zabbix API version: 2.0.8 is not support by this version of zabbixapi (RuntimeError) from /var/lib/openshift/538797de250a1d45b400018c/.gem/gems/zabbixapi-2.2.0/lib/zabbixapi.rb:31:innew' from /var/lib/openshift/538797de250a1d45b400018c/.gem/gems/zabbixapi-2.2.0/lib/zabbixapi.rb:31:in connect' from /var/lib/openshift/538797de250a1d45b400018c/zabbix//usr/bin/zabbix-add-host:5:in

'

A temp workaround is to ssh into your zabbix gear and:

gem uninstall zabbixapi

gem install zabbixapi -v 2.0

LudoMeurillon commented 10 years ago

I wrote a (very simple) patch, we can close this issue and continue to discuss on https://github.com/a13m/openshift-zabbix-cartridge/issues/6