Description of problem: The ndo2db service dies immediately after starting the service on RHEL7. Version-Release number of selected component (if applicable): 2.0.0-5 How reproducible: Always Steps to Reproduce: 1. Install ndoutils 2. service ndo2db start Actual results: There are two points of failure. (See additional info.) 1. It will fail due to not being able to open the socket in the parent process. 2. The service immediately exits successfully. Expected results: The service should start and continue running. Additional info: The first reason it fails is because the socket's parent directory doesn't exist since /var/run is tmpfs on RHEL7, and the tmpfiles.d file is missing from the package. It should install a /usr/lib/tmpfiles.d/ndoutils.conf, probably containing "d /var/run/ndoutils 0755 nagios nagios -". Correcting that, it still exits immediately while Type=simple is set in the service file. Changing it to Type=forking made it run most of the time. It still decided to immediately exit sporadically, as if there is a race condition. Maybe this has to do with the fact that it actually forks twice and lets the grandchild process continue, and systemd expects everything to be ready when the parent process exits. It seems to consistently start and run successfully when the PIDFile line is uncommented, although sometimes systemd prints a warning that it failed to read the PID file (again probably because of a race condition with the parent process exiting and the grandchild process writing the PID).
(In reply to fedora.dm0 from comment #0) > The first reason it fails is because the socket's parent directory doesn't > exist since /var/run is tmpfs on RHEL7, and the tmpfiles.d file is missing > from the package. It should install a /usr/lib/tmpfiles.d/ndoutils.conf, > probably containing "d /var/run/ndoutils 0755 nagios nagios -". Thanks, I completely forgot. Mostly RHEL 5/6 user here, I made tests only on my system. http://pkgs.fedoraproject.org/cgit/ndoutils.git/commit/?id=96036382c81cd52e3a2a2bc15adf3727225c8b47 > Correcting that, it still exits immediately while Type=simple is set in the > service file. Changing it to Type=forking made it run most of the time. It > still decided to immediately exit sporadically, as if there is a race > condition. Maybe this has to do with the fact that it actually forks twice > and lets the grandchild process continue, and systemd expects everything to > be ready when the parent process exits. > > It seems to consistently start and run successfully when the PIDFile line is > uncommented, although sometimes systemd prints a warning that it failed to > read the PID file (again probably because of a race condition with the > parent process exiting and the grandchild process writing the PID). Did not experience this in the limited testing I've done on Fedora. I've added both changes (type + pidfile). http://pkgs.fedoraproject.org/cgit/ndoutils.git/commit/?id=fe201e518cf5b87b174706bd05d914a33f130277 Can you make a test with the builds and see that everything is fixed in 2.0.0-6? http://koji.fedoraproject.org/koji/packageinfo?packageID=8920
Are you a packager already? Would you like to become co-maintainer of ndoutils?
(In reply to Simone Caronni from comment #1) > Did not experience this in the limited testing I've done on Fedora. I've > added both changes (type + pidfile). > > http://pkgs.fedoraproject.org/cgit/ndoutils.git/commit/ > ?id=fe201e518cf5b87b174706bd05d914a33f130277 Also added this to the el6/el5 branch (without building), as the spec file allows for rebuilding across all RHEL/Fedora supported distributions.
(In reply to Simone Caronni from comment #1) > Can you make a test with the builds and see that everything is fixed in > 2.0.0-6? > > http://koji.fedoraproject.org/koji/packageinfo?packageID=8920 It's working now, thanks. A minor issue with the change is that the guidelines[1] say the RPM should still own the /var/run/ndoutils directory when using tmpfiles.d. Also, the directory is owned by nagios:root in the RPM and nagios:nagios in tmpfiles.d; maybe the same group should be used in both places so "rpm --verify" won't complain about it. (In reply to Simone Caronni from comment #2) > Are you a packager already? Would you like to become co-maintainer of > ndoutils? No, I'm not a packager in Fedora. I wouldn't mind co-maintaining ndoutils if you are a sponsor or can ask one about this (according to what I saw on the wiki[2]). If you'd like to try helping me get sponsored for this and need additional information, perhaps we can discuss it over e-mail. [1] https://fedoraproject.org/wiki/Packaging:Tmpfiles.d#Example_spec_file [2] https://fedoraproject.org/wiki/How_to_get_sponsored_into_the_packager_group#Become_a_co-maintainer
ndoutils-2.0.0-7.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/ndoutils-2.0.0-7.fc20
ndoutils-2.0.0-7.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ndoutils-2.0.0-7.fc19
Package ndoutils-2.0.0-7.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing ndoutils-2.0.0-7.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-7860/ndoutils-2.0.0-7.fc19 then log in and leave karma (feedback).
ndoutils-2.0.0-7.fc20 works
ndoutils-2.0.0-7.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
ndoutils-2.0.0-7.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.