puppet-zabbix icon indicating copy to clipboard operation
puppet-zabbix copied to clipboard

Yum Repo doesn't stick to zabbix_version

Open tux-o-matic opened this issue 8 years ago • 4 comments

Even though "zabbix_version" is set to "3.2", the latest version of this module (5.0.0) still updates to the Yumrepo to 3.4.

tux-o-matic avatar Sep 25 '17 10:09 tux-o-matic

It's misleading to have a "zabbix_version" param but to only use it for setting the Yum repo then install the package with an "ensure" value coming from "zabbix::agent::zabbix_package_state".

tux-o-matic avatar Apr 18 '18 12:04 tux-o-matic

@tux-o-matic Have you manage to control upgrade of zabbix-agent using zabbix_package_state => 'latest' as stated in https://forge.puppet.com/puppet/zabbix/5.0.0/readme#upgrade I get unclear error even that I have the 4.2 EL6/7 Repos in place

Error: Could not get latest version: undefined method []' for nil:NilClass Error: /Stage[main]/Zabbix::Agent/Package[zabbix-agent]/ensure: change from 3.2.11-1.el6 to latest failed: Could not get latest version: undefined method []' for nil:NilClass

If I run yum install zabbix-agent -y I can upgrade without problems. Thanks.

miksonx avatar Jun 27 '19 11:06 miksonx

@miksonx , that sounds like a Puppet problem (not the Zabbix module) parsing the output of the Yum provider. Even with manual upgrade working for you, I'd check the output of this to compare:

yum list --showduplicates zabbix-agent

I think a PR will be needed to fix the way agent/repo version are used in the module. Nothing happened since 2017 and I'm still not satisfied with the way this module controls the Zabbix version to install.

tux-o-matic avatar Jun 27 '19 11:06 tux-o-matic

Hi @tux-o-matic It's strange that this only happens on EL6. (I didn't verify on EL7 before posting, verified now and works on some EL7) Anyway on EL6 this is the output

zabbix-agent.x86_64 3.2.11-1.el6 @BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 Available Packages zabbix-agent.x86_64 3.2.0-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.1-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.2-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.3-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.4-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.5-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.6-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.7-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.8-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.9-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.10-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.10-2.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 3.2.11-1.el6 BC_Zabbix_Zabbix_3_2_RHEL6_x86_64 zabbix-agent.x86_64 4.2.0-1.el6 BC_Zabbix_Zabbix_4_2_RHEL6_x86_64 zabbix-agent.x86_64 4.2.1-1.el6 BC_Zabbix_Zabbix_4_2_RHEL6_x86_64 zabbix-agent.x86_64 4.2.2-1.el6 BC_Zabbix_Zabbix_4_2_RHEL6_x86_64 zabbix-agent.x86_64 4.2.3-1.el6 BC_Zabbix_Zabbix_4_2_RHEL6_x86_64 zabbix-agent.x86_64 4.2.3-2.el6 BC_Zabbix_Zabbix_4_2_RHEL6_x86_64

miksonx avatar Jun 27 '19 11:06 miksonx