Bug 262438 - net-mgmt/zabbix6-server issues
Summary: net-mgmt/zabbix6-server issues
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-09 07:20 UTC by rob2g2
Modified: 2022-05-09 20:46 UTC (History)
6 users (show)

See Also:
bugzilla: maintainer-feedback? (cy)


Attachments
net-mgmt/zabbix6-server: Adjust minimum mysql requirement (1.13 KB, patch)
2022-03-09 18:25 UTC, Cy Schubert
no flags Details | Diff
net-mgmt/zabbix6-server: Correct pkg-message (2.45 KB, patch)
2022-03-09 18:26 UTC, Cy Schubert
no flags Details | Diff
Mariadb support (722 bytes, patch)
2022-04-09 14:35 UTC, Cy Schubert
no flags Details | Diff
Try this patch (791 bytes, patch)
2022-05-02 22:06 UTC, Cy Schubert
no flags Details | Diff
Give choice for any supported MySQL version (1.45 KB, patch)
2022-05-03 08:17 UTC, Andrew
andrew.hotlab: maintainer-approval? (andrew.hotlab)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description rob2g2 2022-03-09 07:20:40 UTC
the new zabbix6-server pulls in mysql57-client as a dependency. So one has to also install mysql57-server in order to run zabbix6 (mysql80-server or mariadb106-server does not work). However, zabbix6 is not compatible with mysql57-server, the site https://www.zabbix.com/documentation/current/en/manual/installation/requirements#database-management-system lists version 8.0 to be required (or mariadb 10.5+10.6) and also trying to start the server results in a log entry:

91347:20220309:073615.718 Unable to start Zabbix server due to unsupported MySQL database server version (5.07.37)
 91347:20220309:073615.718 Must be at least (8.00.0)
 91347:20220309:073615.718 Use of supported database version is highly recommended.
 91347:20220309:073615.718 Override by setting AllowUnsupportedDBVersions=1 in Zabbix server configuration file at your own risk.


Also a cosmetic issue - the package reports: 

"
Standard Zabbix releases are supported for Zabbix customers during six (6)
months of Full Support (general, critical and security issues) until the next
Zabbix stable release, plus one (1) additional month of Limited Support
(critical and security issues only). Zabbix Standard version release will result
in change of the second version number.

Stable release:         Zabbix 6.0
Release date:           May 17, 2021
End of Full Support:    Nov 30, 2021
End of Limited Support: Dec 31, 2021

Zabbix Life Cycle & Release Policy:
https://www.zabbix.com/life_cycle_and_release_policy
"

Zabbix 6.0 is a LTS version and is supported until Feb 28, 2025 with limited supporte until Feb 28, 2027.
Comment 1 rob2g2 2022-03-09 07:22:09 UTC
System used: FreeBSD 13.0-RELEASE-p6 on amd64
Comment 2 Cy Schubert freebsd_committer freebsd_triage 2022-03-09 18:24:22 UTC
Please apply both attached patches and let me know if they fix the problem.
Comment 3 Cy Schubert freebsd_committer freebsd_triage 2022-03-09 18:25:28 UTC
Created attachment 232351 [details]
net-mgmt/zabbix6-server: Adjust minimum mysql requirement

This forces mysql 8.0.
Comment 4 Cy Schubert freebsd_committer freebsd_triage 2022-03-09 18:26:03 UTC
Created attachment 232352 [details]
net-mgmt/zabbix6-server: Correct pkg-message

    Correct pkg-message regarding LTS as described at
    https://www.zabbix.com/life_cycle_and_release_policy.
    
    PR:             262438
    Reported by:    rob2g2 <rob2g2-freebsd@bitbert.com>
    MFH:            2022Q1
Comment 5 FloGatt 2022-03-19 11:30:53 UTC
Thank you Cy, seems the patch seems to work. When will it be merged into the port?
Comment 6 Cy Schubert freebsd_committer freebsd_triage 2022-03-19 14:27:54 UTC
It already has been, for ten days.
Comment 7 FloGatt 2022-04-08 09:29:56 UTC
OK but the dependency still shows libmysqlclient.so.20 : databases/mysql57-client. Am i missing somethine here?
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-04-08 15:30:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9d8cb8eb28c5e8f7be50841c27d54cb23db20db1

commit 9d8cb8eb28c5e8f7be50841c27d54cb23db20db1
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-04-08 15:27:14 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-04-08 15:30:16 +0000

    net-mgmt/zabbix6-server: Require mysql 8.0

    When using mysql, zabbix6 requires 8.0, not the default 5.7. 8.0 is
    supported by upstream.

    PR:             262438
    Reported by:    rob2g2 <rob2g2-freebsd@bitbert.com>
    MFH:            2022Q2

 net-mgmt/zabbix6-server/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-04-08 15:34:42 UTC
A commit in branch 2022Q2 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=08b0bc982509a41b8435da3c7f4e8170e0113a2b

commit 08b0bc982509a41b8435da3c7f4e8170e0113a2b
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-04-08 15:27:14 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-04-08 15:33:40 +0000

    net-mgmt/zabbix6-server: Require mysql 8.0

    When using mysql, zabbix6 requires 8.0, not the default 5.7. 8.0 is
    supported by upstream.

    PR:             262438
    Reported by:    rob2g2 <rob2g2-freebsd@bitbert.com>

    (cherry picked from commit 9d8cb8eb28c5e8f7be50841c27d54cb23db20db1)

 net-mgmt/zabbix6-server/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Comment 10 Peter Kubica 2022-04-09 11:13:55 UTC
(In reply to commit-hook from comment #9)
Won't work with MariaDB like this...
Comment 11 Cy Schubert freebsd_committer freebsd_triage 2022-04-09 13:24:31 UTC
Upstream only supports mysql 8.0.
Comment 13 Cy Schubert freebsd_committer freebsd_triage 2022-04-09 14:35:19 UTC
Created attachment 233099 [details]
Mariadb support

Try this patch.
Comment 14 Peter Kubica 2022-04-10 09:33:07 UTC
Not working, there is CONFIGURE_WITH conflict. Maybe consider using IGNORE_WITH_MYSQL?
Comment 15 Andrew 2022-05-02 07:04:08 UTC
I think this bug shouldn't be marked as "fixed", since the port does not compile with MariaDB 10.6 yet:

  ===>  zabbix6-server-6.0.2_1 cannot install: MySQL versions mismatch:
  mariadb106-client is installed and wanted version is mysql80-client.
  *** Error code 1
  
  Stop.
  make: stopped in /usr/ports/net-mgmt/zabbix6-server

Please note that I have this in /etc/make.conf:

  DEFAULT_VERSIONS+=mysql=106m
Comment 16 Cy Schubert freebsd_committer freebsd_triage 2022-05-02 22:06:47 UTC
Created attachment 233688 [details]
Try this patch

Try the attached patch.
Comment 17 Cy Schubert freebsd_committer freebsd_triage 2022-05-02 22:14:50 UTC
Incomplete fix.
Comment 18 Andrew 2022-05-03 08:17:23 UTC
Created attachment 233693 [details]
Give choice for any supported MySQL version

(In reply to Cy Schubert from comment #17)
Thank you, I just tried and it works with both MySQL 8.0 and MariaDB 10.6

I do not understand the need to indicate this in ${MDB_CONFIGURE_ON}:

  --with-mysql=${LOCALBASE}/bin/mysql_config

I tried by using only "--with-mysql" and it seems to work anyway.

Then, by reading this[1], I guess it would be necessary to give FreeBSD users the option to compile with MariaDB 10.5 too. For this reason I wrote the attached patch yesterday, which asks the user to choose among all supported MySQL versions in a separate option group, but maybe it's overkill... I let you decide what it's the best solution: I built the port successfully with both of them.


[1] https://www.zabbix.com/documentation/current/en/manual/installation/upgrade_notes_600#databases
Comment 19 commit-hook freebsd_committer freebsd_triage 2022-05-09 18:12:37 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=35e739b646c05e5ee5823f9d411f3e6f0362b2a4

commit 35e739b646c05e5ee5823f9d411f3e6f0362b2a4
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2022-05-02 22:10:33 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2022-05-09 17:48:48 +0000

    net-mgmt/zabbix6-server: Fix mariadb opton

    Mariadb option failed to build properly.

    PR:             262438
    Fixes:          9d8cb8eb28c5e8f7be50841c27d54cb23db20db1
    MFH:            2022Q2

 net-mgmt/zabbix6-server/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)