puppet-zabbix
puppet-zabbix copied to clipboard
zabbix-sender is not upgraded to latest version.
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 4.10.12
- Ruby: 2.3.1.p112
- Distribution: Ubuntu 16.04.6
- Module version: 8.0
How to reproduce (e.g Puppet code you use)
We are upgrading some clients' from zabbix 4 to zabbix 5 with this code:
class profile::zabbix_agent5 (
)
{
class { 'zabbix::agent':
zabbix_version => '5.0',
zabbix_package_state => 'latest',
server => "$zabbixServerIps",
serveractive => "$zabbixServerIps",
listenip => "0.0.0.0",
include_dir => "/etc/zabbix/zabbix_agentd.d",
include_dir_purge => "false",
}
include zabbix::sender
}
What are you seeing
zabbix-agent is updated to the "latest" version as expected. zabbix-sender however, remains on 4.x.
What behaviour did you expect instead
zabbix-sender also upgraded to 5.x
Output log
Adding notice code to the agent.pp and sender.pp file in the module shows the current state:
Notice: /Stage[main]/Zabbix::Agent/Notify[Zabbix-agent debugging. ensure = latest]/message: current_value 'absent', should be 'Zabbix-agent debugging. ensure = latest' (noop)
Notice: /Stage[main]/Zabbix::Sender/Notify[Zabbix-sender debugging. ensure = present]/message: current_value 'absent', should be 'Zabbix-sender debugging. ensure = present' (noop)
I expect ensure = latest for zabbix::sender, since it should be inherited from the other zabbix packages, from what I understand of the code:
# Installing the package
package { 'zabbix-sender':
ensure => $zabbix_package_state,
#ensure => latest,
require => Class['zabbix::repo'],
tag => 'zabbix',
}
I have tested with a modified version of sender.pp with explicit ensure => latest, as you can see, and that makes it work as I expect:
Notice: /Stage[main]/Zabbix::Sender/Package[zabbix-sender]/ensure: current_value '1:4.2.8-1+bionic', should be '1:5.0.15-1+bionic' (noop)
Notice: Class[Zabbix::Sender]: Would have triggered 'refresh' from 1 event
Any additional information you'd like to impart
As far as I see from the code you have to explicitly call zabbix::sender class with zabbix_package_state
set.
I don't think it's being inherited
The default value is set in the params.pp file which is by default present
As far as I see from the code you have to explicitly call zabbix::sender class with
zabbix_package_state
set. I don't think it's being inheritedThe default value is set in the params.pp file which is by default
present
I read it the same way.
Given there has been no other movement on this issue for 2 years, I am going to close it now.