On first running of zabbix-agentd, it complains in the log about not having access to the pidfile at /var/run/zabbix/zabbix_agentd.pid. It would be nice if the ebuild would setup this directory at install time.
Are you saying the /var/run/zabbix directory did not exist? Or did it have improper permissions? Looking at the 2.0.1 ebuild, at the top of the src_install function - we have the following commands: dodir \ /etc/zabbix \ /var/lib/zabbix \ /var/lib/zabbix/home \ /var/lib/zabbix/scripts \ /var/log/zabbix \ /var/run/zabbix keepdir \ /etc/zabbix \ /var/lib/zabbix \ /var/lib/zabbix/home \ /var/lib/zabbix/scripts \ /var/log/zabbix \ /var/run/zabbix So, the directory should definitely exist after emerging.
I think the perms must be have been wrong. Can't check now, I fixed them up.
Hello, have same problem. When server rebooted, directory /var/run cleanup. Zabbix-agent init script must check is directory present and create it if not.
Created attachment 319184 [details] Fixed zabbix-agentd init script
Looks to be valid bug caused by the recent changes to support /run - so, yes, init scripts are now required to recreate their /var/run/subdirs when starting. yay. Thanks for submitting patch -- I'll review and likely implement at the same time I bump for next zabbix release - will port back to current stable release.
Created attachment 319422 [details] Fixed bug in previous init script Previous script with bug. If PidFile option not defined in zabbix_agentd.conf, previous init script change owner on /tmp directory. Now script change owner only if create directory for pid file.
Appreciate the refined init script but I need to review it more to make sure it meets our needs. I've grabbed the directory check portion from it and pushed it into 2.0.2-r1 ebuild which is being pushed to cvs now. Feel free to test. If there are still issues with init script, we can open separate bugs for those.
Problem fixed, but if I change location of pid file in zabbix_agentd.conf, init script will still create /var/run/zabbix anyway.
The current stable ebuild of zabbix: 1.8.15 is still defective. I've just manually applied in one of my servers Tiziano Müller's solution available at https://bugs.gentoo.org/show_bug.cgi?id=445944#c1 and it worked fine. Should there be a fixed stable ebuild?