Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 426818 - net-analyzer/zabbix - needs /var/run/zabbix to run the agentd
Summary: net-analyzer/zabbix - needs /var/run/zabbix to run the agentd
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Matthew Marlowe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-16 09:35 UTC by Dirkjan Ochtman (RETIRED)
Modified: 2012-12-20 19:02 UTC (History)
2 users (show)

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


Attachments
Fixed zabbix-agentd init script (zabbix-agentd,1.27 KB, text/plain)
2012-07-25 08:14 UTC, zunkree
Details
Fixed bug in previous init script (zabbix-agentd,1.27 KB, text/plain)
2012-07-27 15:36 UTC, zunkree
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dirkjan Ochtman (RETIRED) gentoo-dev 2012-07-16 09:35:51 UTC
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.
Comment 1 Matthew Marlowe (RETIRED) gentoo-dev 2012-07-16 16:47:52 UTC
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.
Comment 2 Dirkjan Ochtman (RETIRED) gentoo-dev 2012-07-16 17:38:06 UTC
I think the perms must be have been wrong. Can't check now, I fixed them up.
Comment 3 zunkree 2012-07-24 20:37:06 UTC
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.
Comment 4 zunkree 2012-07-25 08:14:17 UTC
Created attachment 319184 [details]
Fixed zabbix-agentd init script
Comment 5 Matthew Marlowe (RETIRED) gentoo-dev 2012-07-27 14:40:47 UTC
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.
Comment 6 zunkree 2012-07-27 15:36:00 UTC
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.
Comment 7 Matthew Marlowe (RETIRED) gentoo-dev 2012-08-01 21:52:59 UTC
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.
Comment 8 zunkree 2012-08-24 08:17:04 UTC
Problem fixed, but if I change location of pid file in zabbix_agentd.conf, init script will still create /var/run/zabbix anyway.
Comment 9 Rodrigo Severo 2012-12-20 19:02:20 UTC
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?