Uploaded image for project: 'ZABBIX FEATURE REQUESTS'
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-9453

Add a command line switch to zabbix_server to only verify/upgrade the database schema and exit

XMLWordPrintable

    • Icon: New Feature Request New Feature Request
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 7.0.3
    • Server (S)
    • 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.

            wiper Andris Zeila
            christiananton Christian Anton
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: