voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.

Home Page:https://forge.puppet.com/puppet/zabbix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zabbix 6.0

jameskirsop opened this issue · comments

Zabbix 6.0 will be released soon (RC's are now out). This issue is to track discussion around changes to allow this module to install/upgrade to 6.0.

commented

Switching the versioncmp strings from

if versioncmp($zabbix_version, '5.4') == 0 {

to

if versioncmp($zabbix_version, '5.4') != -1 {

was enough to get 6.0 running for me.

I did manually run the /usr/share/doc/zabbix-sql-scripts/mysql/history_pk_prepare.sql script against my db, but i'm not sure if that was technically required.

The service also needed a manual restart post install, but everything came up cleanly.

Switching the versioncmp strings from

if versioncmp($zabbix_version, '5.4') == 0 {
to
if versioncmp($zabbix_version, '5.4') != -1 {

Better keep a comparison with 0:

if versioncmp($zabbix_version, '5.4') >= 0 {

you can then put the comparison operator between the operands in your head to immediately see what is tested: $zabbix_version >= '5.4' 😉


Have you considered opening a Pull Request (PR) to add your change? This look like a perfect enhancement for a first-time contributor!

If you do not know how to start, here is a quite complete guide about the process of contributing to projects on GitHub:
https://dataschool.io/how-to-contribute-on-github

In any case, do not feel scared: we are here to help!

commented

There's a few more bits it turns out. StartODBCPollers needs an addition in params, proxy.pp, server.pp and the appropriate templates.

Upgrades DO require the sql for history to be run.
Templates need to be manually updated (from https://git.zabbix.com/rest/api/latest/projects/ZBX/repos/zabbix/archive?at=refs%2Ftags%2F6.0.0&format=zip )

I'll admit you're right with your logic, ! -1 will catch 0 (equal) or 1 (newer), but working with negatives isn't really ideal.

My module isn't PR capable at this point, i've delta'd off the beaten track (in part due to some custom hackery to early-enable agent2).

If this is still pending when the agent2 PR is merged I'll come back and backfill my changes in a PR on that.

Otherwise, consider this at minimum a quantification of the known upgrade caveats. With the items noted above, conversion time was ~15 minutes, but you do lose your history (renamed to history_old), which may be non-trivial for some consumers.

I've got a branch here: https://github.com/jameskirsop/puppet-zabbix/tree/zabbix6.0support

It's probably PR-ready for adding basic 6.0 support after someone more familiar with this module has a quick look to make sure I've not missed anything.

https://github.com/voxpupuli/puppet-zabbix/blob/master/lib/puppet/provider/zabbix_template/ruby.rb#L46

This may need updating as well. And generally some other regexes. The test should catch those though.
@jameskirsop provide the PR whenever it's ready, else i'll can help later 😄

Hello folks!

I would appreciate it if you took a moment to review/test the linked PR which adds Zabbix 6.0 support to the module 😄

-Chris

Hi All,

Proxy schema file is no longer an archive file and the name has changed to proxy.sql

https://git.zabbix.com/projects/WEB/repos/documentation/browse/en/manual/installation/install_from_packages/debian_ubuntu.md?at=refs%2Fheads%2Frelease%2F6.0

This is already covered by the PR