zabbix-community / helm-zabbix

Helm chart for Zabbix
https://artifacthub.io/packages/helm/zabbix-community/zabbix
Apache License 2.0
77 stars 45 forks source link

Fix upgrade to zabbix7 #102

Open crowleym opened 4 days ago

crowleym commented 4 days ago

What this PR does / why we need it:

Zabbix 7 has changed behaviour. DB upgrade can only happen if server node is single and not HA configured. DB upgrade is automatically performed by the server node. See comments in #42

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer:

I have disabled the creation of the job that runs the db-inint-script as I do not believe is necessary anymore with new Zabbix behaviour. This is a fundemental change, so rather than delete the template I have just forced the generation condition to false so it is not executed.

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

fibbs commented 3 days ago

see my comment in the issue. I don't believe needing to disable HA mode is a good way to achieve major release upgrades. Of course, it kind of solves the problem, but it isn't "nice" though.

crowleym commented 3 days ago

Agree its not nice, but logs from Server when starting up gave me the impression I did not have an alternative.

 1:20240627:120804.783 Starting Zabbix Server. Zabbix 7.0.0 (revision 49955f1).
 1:20240627:120804.783 ****** Enabled features ******
 1:20240627:120804.783 SNMP monitoring:           YES
 1:20240627:120804.783 IPMI monitoring:           YES
 1:20240627:120804.783 Web monitoring:            YES
 1:20240627:120804.783 VMware monitoring:         YES
 1:20240627:120804.783 SMTP authentication:       YES
 1:20240627:120804.783 ODBC:                      YES
 1:20240627:120804.783 SSH support:               YES
 1:20240627:120804.783 IPv6 support:              YES
 1:20240627:120804.783 TLS support:               YES
 1:20240627:120804.783 ******************************
 1:20240627:120804.783 using configuration file: /etc/zabbix/zabbix_server.conf
 1:20240627:120804.927 current database version (mandatory/optional): 06020000/06020013
 1:20240627:120804.927 required mandatory version: 07000000
 1:20240627:120804.927 mandatory patches were found
 1:20240627:120804.935 cannot perform database upgrade in HA mode: all nodes need to be stopped and Zabbix server started in standalone mode for the time of upgrade.
 1:20240627:120804.936 Zabbix Server stopped. Zabbix 7.0.0 (revision 49955f1).

I have proceeded with my upgrade, but look forward to understanding final solution.