voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
79 stars 229 forks source link

install Zabbix 6.0 by default everywhere but EL7 #894

Closed evgeni closed 9 months ago

evgeni commented 9 months ago

Pull Request (PR) description

This Pull Request (PR) fixes the following issues

evgeni commented 9 months ago

And now someone please explain to me why this breaks idempotency tests…

zilchms commented 9 months ago

I am taking a guess: You basically updated the version ubuntu and debian install from 5.0 to 6.0 in your PR, and while the installation seems to be no problem something in the configs kills the service instantly after starting it. 2 possible solutions:

  1. try to fix the config for ubuntu and debian (that could take a while)
  2. only install 6.0 on EL9, and update the default to 6.0 at a later time (easy, but ugly)
evgeni commented 9 months ago

But 6.0 should have already been tested there as we test all supported versions on all supported OSes 🤔

evgeni commented 9 months ago

Hah. So some testing in #893 reveals that it's also not idempotent on EL9 and more so spec/acceptance/server_spec.rb never tested non-default versions, and spec/acceptance/zabbix_*_spec.rb have some special code because the apache module (???) is not idempotent.

I'll add non-default version tests to server_spec.rb tomorrow and see how what the real issue is. :disappointed:

evgeni commented 9 months ago
Oct 04 16:08:23 centos8-stream.tanso.example.com systemd[1]: Started Zabbix Server.
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Starting Zabbix Server. Zabbix 6.0.22 (revision 2b0090fc371).
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: ****** Enabled features ******
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: SNMP monitoring:           YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: IPMI monitoring:           YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Web monitoring:            YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: VMware monitoring:         YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: SMTP authentication:       YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: ODBC:                      YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: SSH support:               YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: IPv6 support:              YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: TLS support:               YES
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: ******************************
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: using configuration file: /etc/zabbix/zabbix_server.conf
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: 
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Unable to start Zabbix server due to unsupported PostgreSQL database version (12.12).
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Must be at least (13.0).
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Use of supported database version is highly recommended.
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Override by setting AllowUnsupportedDBVersions=1 in Zabbix server configuration file at your own risk.
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: 
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Starting Zabbix Server. Zabbix 6.0.22 (revision 2b0090fc371).
Oct 04 16:08:23 centos8-stream.tanso.example.com zabbix_server[26145]: Press Ctrl+C to exit.
Oct 04 16:08:23 centos8-stream.tanso.example.com systemd[1]: zabbix-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 16:08:23 centos8-stream.tanso.example.com systemd[1]: zabbix-server.service: Failed with result 'exit-code'.

Funny that no other test caught that… "funny"…

zilchms commented 9 months ago

well now we know what the problem is, zabbix 6 introduces a dependency to postgres >=13. and we only tested 5.0 due to faulty spec_helper

evgeni commented 9 months ago

well now we know what the problem is, zabbix 6 introduces a dependency to postgres >=13. and we only tested 5.0 due to faulty spec_helper

I don't even think it's "faulty", just that those tests weren't testing the server part but the API provided by zabbix-web, which talks directly to the DB and doesn't check the version :see_no_evil: