Skip to content

Conversation

@hertell
Copy link

@hertell hertell commented May 17, 2023

Pull Request (PR) description

I recently upgraded all agents to the latest 6.4 version of zabbix, and stumbled into Zabbix having issues eg getting old agents not compatible with new items from 6.4. I figured out that the upgrade of the agent-package did upgrade the agent, but it did not restart them, which left the old agent running. This had me to restart all agents manually. This fix will restart the agent if it get's upgraded.

The agent is not being restarted if the package get's upgraded when using  zabbix_package_state => 'latest'. This fix will do that.
ensure => $service_ensure,
enable => $service_enable,
require => $service_require,
subscribe => Package[$zabbix_package_agent],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should already be present via the $service_require, which is defined as:

  $service_require = $manage_startup_script ? {
    true  => [Package[$zabbix_package_agent], Zabbix::Startup[$servicename]],
    false => Package[$zabbix_package_agent]
  }

If something requires a thing, it will get notified about changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you set zabbix_package_state => latest? Otherwise Puppet would not have updated the package and nothing would have issued the notification.

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 this pull request may close these issues.

2 participants