-
New Feature Request
-
Resolution: Unresolved
-
Minor
-
None
-
7.0.3
-
None
-
Container installations mainly
I am requesting you to add a commandline switch (parameter) to the zabbix_server binary that makes the zabbix_server behave as follows:
- Start up and parse configuration file
- connect to database
- verify database schema version
- If an upgrade is needed (major release upgrade), upgrade schema accordingly
- exit program with exitcode 0 if no errors (either upgrade of schema successful or no upgrade needed) and any other exitcode if an error happened (such as not being able to connect to db or upgrade went wrong)
All above, except the last one, are steps that zabbix_server already automatically does. The reason why I am requesting a specific commandline switch for this is the following:
Especially in containerized environments, and more specifically in Kubernetes, it is highly desirable to put the step of database initialization in a "pre-deployment job". With this, a high available setup would be possible to create with a helm chart and upgrading the database would work without first switching HA off, scale down manually, upgrade image, wait, and scale back up to multiple running instances. Instead, the Helm Chart would act as follows:
- always start the "real" Zabbix Server containers in HA mode, even if only one is desired (making it easy to scale up and down)
- Every time a deployment is being upgraded or deployed (Helm upgrade, Helm install), a job container would be run, checking whether a major release upgrade is necessary, and in case it is it would scale down all running server containers, upgrade database, and run the containers with the new version
Due to the way Helm and Kubernetes is designed, it would be extremely beneficial to have a way to "only upgrade database" in a controlled way, with a clear signal when finished.