| Summary: | systemctl restart nscd.service kills but does not (re)start nscd | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ville Skyttä <ville.skytta> | ||||||
| Component: | glibc | Assignee: | Jeff Law <law> | ||||||
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 16 | CC: | Francis.Montagnac, fweimer, jakub, law, schwab | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2012-02-03 20:43:11 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
|
Description
Ville Skyttä
2011-12-29 20:54:38 UTC
Created attachment 550156 [details]
No forking, nscd -d, fix typo: -i services
I have the same problem. Replacing /lib/systemd/system/nscd.service by the proposed attachement (https://bugzilla.redhat.com/attachment.cgi?id=550156) seems (be always carefull with nscd :-)) to work for me. You may prefer to install this file in /etc/systemd/system/nscd.service and to link /etc/systemd/system/multi-user.target.wants/nscd.service to: ../nscd.service This as the disadvantage of logging too much of nscd in syslog. This could be changed in nscd.service by requesting to log to /dev/null (not tested yet). Francis PS: This also fixes a typo in this service file: ! ExecReload=/usr/sbin/nscd -i service ... ! ExecReload=/usr/sbin/nscd -i services Confirmed that the modified unit file works, and too much logging confirmed as well :( By the way, just curious, I wonder why there's no "ExecReload=/usr/sbin/nscd -i netgroup" in the unit file (nor the original one)... > Confirmed that the modified unit file works, Fine. > and too much logging confirmed as well :( Just add in the [Service] section of nscd.service: StandardOutput=null > By the way, just curious, I wonder why there's no > "ExecReload=/usr/sbin/nscd -i netgroup" in the unit file (nor the > original one)... Because nscd is not currently caching netgroups. What is interesting here is the message about being unable to find /run/nscd/nscd.pid Can you send the output of the following commands: cat /proc/mounts ls /var/run ls /run (In reply to comment #4) > StandardOutput=null Sounds like a big hammer that would possibly also lose useful information. > Because nscd is not currently caching netgroups. Even though /etc/nscd.conf contains a netgroups section which is enabled by default? If it has no effect, I suggest removing it then. (In reply to comment #5) > What is interesting here is the message about being unable to find > /run/nscd/nscd.pid But that's not the message in my logs: "PID 2597 read from file /run/nscd/nscd.pid does not exist. Your service or init script might be broken." I think that means that a pid (2597) was read from /run/nscd/nscd.pid, but there's no process with that pid. >> StandardOutput=null > Sounds like a big hammer I would say: a turnaround needed to the lack of an option of nscd to *not* daemonize, unlike for example "crond -n" > that would possibly also lose useful information. Without the -d option, nscd do not log to syslog. If you want logging, it's I think better to declare it in nscd.conf, to log to a file. >> Because nscd is not currently caching netgroups. > Even though /etc/nscd.conf contains a netgroups section which is > enabled by default? Sorry, I was wrong, nscd caches now also the netgroups. I did an upgrade that kept the old (modified) version of nscd.conf. Thanks to point out that. >> What is interesting here is the message about being unable to find >> /run/nscd/nscd.pid ... > I think that means that a pid (2597) was read from /run/nscd/nscd.pid, > but there's no process with that pid. I agree, and you can reproduce it like this: /usr/sbin/nscd -K # stop nscd /usr/sbin/nscd; cat /run/nscd/nscd.pid; ps auxc|grep nscd; sleep 1; cat /run/nscd/nscd.pid 1879 nscd 1901 0.0 0.0 509044 1020 ? Ssl 08:30 0:00 nscd 1901 This last command shows that nscd.pid is *not* valid after nscd returns (and daemonize), but becomes valid after 1 second. IMHO: - the proper way to correct that should be to add a -n option to nscd for running in the foreground. - in the meantime, launch it in debug mode (-d), but redirect its output to /dev/null (In reply to comment #7) > Without the -d option, nscd do not log to syslog. You mean _with_ the -d option? > If you want logging, > it's I think better to declare it in nscd.conf, to log to a file. My nscd does not log anything to the logfile configured in nscd.conf if invoked with -d. Created attachment 556663 [details]
Patch for glibc that introduces daemon-like foreground mode in nscd
Yeah, we really don't want to use nscd -d, it reduces security too (disables paranoid mode). I'm proposing this patch for glibc to introduce --foreground (or -F) to run in foreground, but like a daemon.
|