Description of problem: tmpwatch has a job in /etc/cron.daily/tmpwatch that checks for old file and cleans them up in /var/tmp As a result my stats file got whacked and fedora-ds would not start. perhaps it should be moved to /var/lib/fedora-ds/slapd-instanc Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Nathan, is this still a problem in the latest code?
Yes, the default location is /var/tmp/dirsrv/slapd-foo/slapd.stats. This location can be changed via the nsslapd-tmpdir attribute in cn=config. Perhaps we need to tweak the instance creation code to use a different default?
Nathan, per FHS, if it is stuff that can be removed between reboots it should go under /var/run if it is not to be removed between reboots, but can be safely removed anyway. /var/cache if it can't be removed, ever, /var/lib /var/tmp should never be used for anything that is not a tempf file that can be removed as soon as a specific task is finished. At least this is my understanding. I'd personally put it under /var/lib
Hmm - looking at this some more - this is going to break other things, like console tasks that invoke a server side CGI that needs to write to a temp directory - e.g. backup will attempt to write to a temp file in this directory, and it will certainly blow up if this directory does not exist. This might be a lot of work to change all of the places where we assume a permanently existing temporary server instance specific directory. How hard is it to disable tmpwatch for this particular directory e.g. disable tmpwatch on /var/tmp/dirsrv?
Created attachment 230421 [details] diffs - add rundir to ds
The diffs look good, but we also need to modify the main.c source file for ldap-agent to look in the new location and for the new stats file name.
Created attachment 230431 [details] diffs with snmp
Looks good!
Created attachment 230511 [details] cvs commit log Reviewed by: nkinder (Thanks!) Fix Description: move the snmp slapd.stats file to run_dir (/var/run/dirsrv) and rename to slapd-instance.stats. Had to add nsslapd-rundir to cn=config in order for ldap-agent to be able to get it. Doc: Yes, we need to document the new attribute nsslapd-rundir.
David, we need to document the new attribute nsslapd-rundir in cn=config - Command and File Reference?
Created attachment 230541 [details] cvs commit log - make nsslapd-tmpdir /tmp Fix Description: Move the default nsslapd-tmpdir to /tmp.
Fixed in Fedora DS 1.1.0