Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 750122 - net-analyzer/zabbix-5.0.4 USE=mysql zabbix-sever uint still depends on postgres
Summary: net-analyzer/zabbix-5.0.4 USE=mysql zabbix-sever uint still depends on postgres
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Miroslav Šulc
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-19 12:35 UTC by Anton Gubarkov
Modified: 2021-06-30 09:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Gubarkov 2020-10-19 12:35:28 UTC
I have a configuration of zabbix server with mysql backend. When I stop my host, the mysql server stops before the zabbix-server and consequently zabbix-server takes forever to stop.

home64 ~ # systemctl cat zabbix-server.service
# /lib/systemd/system/zabbix-server.service
[Unit]
Description=Zabbix server
Documentation=https://zabbix.com/manuals
After=syslog.target syslog.service network.target network-online.target postgresql.service
After=postgresql-9.6.service postgresql-10.service
After=postgresql-11.service postgresql-12.service


[Service]
User=zabbix
Group=zabbix
ExecStart=/usr/sbin/zabbix_server --foreground --config /etc/zabbix/zabbix_server.conf

[Install]
WantedBy=multi-user.target


Should postgres/mysql be a Requirement for zabbix rather than After? If I understand this topic, After orders the startup of the services but doesn't care about dependencies at shutdown...



of course, I have worked this around with an /etc/systemd/zabbix-server.d/override.conf, but a sane default would be good too. One of the options would be to ship the matching override file depending on the use flag...
Comment 1 Miroslav Šulc gentoo-dev 2021-06-30 09:03:45 UTC
there are three different cases:
- postgresql: this can't be done as postgresql is slotted and we don't know what slot the user uses
- mysql: though slotted, only one version of mysql can be installed - but atm i can't see mysql providing service file
- oracle: we don't even provide that one

if gentoo mysql would provide service file, i could at least for mysql provide zabbix service file that should work as is. but for now, i won't do that as afaics our mysql does not provide a service file. so your solution is atm imo the only appropriate.