Bug 238211 - net-mgmt/zabbix*-server: Wrong REQUIRE mysql-server in rc script
Summary: net-mgmt/zabbix*-server: Wrong REQUIRE mysql-server in rc script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Danilo G. Baio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-29 11:07 UTC by Miroslav Lachman
Modified: 2019-06-22 12:12 UTC (History)
2 users (show)

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


Attachments
change REQUIRE to mysql (407 bytes, patch)
2019-05-29 11:07 UTC, Miroslav Lachman
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miroslav Lachman 2019-05-29 11:07:10 UTC
Created attachment 204692 [details]
change REQUIRE to mysql

rc.d/zabbix_server has REQUIRE: mysql-server but all MySQL server (I checked MySQL 5.7, 8.0, MariaDB 10.3) has PROVIDE: mysql.
This results in a wrong start up order:

# rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | grep local
rcorder: requirement `mysql-server' in file `/usr/local/etc/rc.d/zabbix_server' has no providers.
/etc/rc.d/mountcritlocal
/etc/rc.d/local_unbound
/usr/local/etc/rc.d/zabbix_server
/usr/local/etc/rc.d/zabbix_agentd
/usr/local/etc/rc.d/snmptrapd
/usr/local/etc/rc.d/snmpd
/etc/rc.d/local
/usr/local/etc/rc.d/rsyncd
/usr/local/etc/rc.d/php-fpm
/usr/local/etc/rc.d/nginx
/usr/local/etc/rc.d/mysql-server
/usr/local/etc/rc.d/garb
/etc/rc.d/localpkg

zabbix_server should be started after mysql-server

When I changed the REQUIRE line to "mysql" it has right order and no warning "has no provider"

# rcorder /etc/rc.d/* /usr/local/etc/rc.d/* | grep local
/etc/rc.d/mountcritlocal
/etc/rc.d/local_unbound
/etc/rc.d/local
/usr/local/etc/rc.d/mysql-server
/usr/local/etc/rc.d/zabbix_server
/usr/local/etc/rc.d/zabbix_agentd
/usr/local/etc/rc.d/snmptrapd
/usr/local/etc/rc.d/snmpd
/usr/local/etc/rc.d/rsyncd
/usr/local/etc/rc.d/php-fpm
/usr/local/etc/rc.d/nginx
/usr/local/etc/rc.d/garb
/etc/rc.d/localpkg

The same change should be made in all Zabbix versions (2.2, 3, 4.2)
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-06-22 12:10:25 UTC
A commit references this bug:

Author: dbaio
Date: Sat Jun 22 12:09:50 UTC 2019
New revision: 504859
URL: https://svnweb.freebsd.org/changeset/ports/504859

Log:
  net-mgmt/zabbix*: Fix MySQL order in rc scripts

  MySQL and MariaDB uses `PROVIDE: mysql`.

  PR:		238211
  Submitted by:	Miroslav Lachman <000.fbsd@quip.cz>
  Approved by:	maintainer timeout (pg@pakhom.spb.ru, > 3 weeks)

Changes:
  head/net-mgmt/zabbix22-server/Makefile
  head/net-mgmt/zabbix22-server/files/zabbix_proxy.in
  head/net-mgmt/zabbix22-server/files/zabbix_server.in
  head/net-mgmt/zabbix3-server/Makefile
  head/net-mgmt/zabbix3-server/files/zabbix_proxy.in
  head/net-mgmt/zabbix3-server/files/zabbix_server.in
  head/net-mgmt/zabbix4-server/Makefile
  head/net-mgmt/zabbix4-server/files/zabbix_proxy.in
  head/net-mgmt/zabbix4-server/files/zabbix_server.in
  head/net-mgmt/zabbix42-server/Makefile
  head/net-mgmt/zabbix42-server/files/zabbix_proxy.in
  head/net-mgmt/zabbix42-server/files/zabbix_server.in
Comment 2 Danilo G. Baio freebsd_committer freebsd_triage 2019-06-22 12:12:42 UTC
(In reply to Miroslav Lachman from comment #0)

Committed, thanks for catching this!