Bug 250179 - tmpwatch whacks stats
tmpwatch whacks stats
Product: Fedora
Classification: Fedora
Component: 389-ds-base (Show other bugs)
All Linux
high Severity high
: ---
: ---
Assigned To: Rich Megginson
Fedora Extras Quality Assurance
: screened
Depends On:
Blocks: 240316
  Show dependency treegraph
Reported: 2007-07-30 17:31 EDT by Dennis Gilmore
Modified: 2011-04-25 19:28 EDT (History)
4 users (show)

See Also:
Fixed In Version: 1.1.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-01-14 12:22:53 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
diffs - add rundir to ds (11.99 KB, patch)
2007-10-17 18:01 EDT, Rich Megginson
no flags Details | Diff
diffs with snmp (17.15 KB, patch)
2007-10-17 18:34 EDT, Rich Megginson
no flags Details | Diff
cvs commit log (1.39 KB, text/plain)
2007-10-17 21:22 EDT, Rich Megginson
no flags Details
cvs commit log - make nsslapd-tmpdir /tmp (193 bytes, text/plain)
2007-10-17 21:43 EDT, Rich Megginson
no flags Details

  None (edit)
Description Dennis Gilmore 2007-07-30 17:31:01 EDT
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:
Actual results:

Expected results:

Additional info:
Comment 1 Rich Megginson 2007-10-17 14:36:50 EDT
Nathan, is this still a problem in the latest code?
Comment 2 Nathan Kinder 2007-10-17 14:50:41 EDT
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?
Comment 3 Simo Sorce 2007-10-17 15:50:10 EDT
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.
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
Comment 4 Rich Megginson 2007-10-17 15:55:11 EDT
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?
Comment 5 Rich Megginson 2007-10-17 18:01:17 EDT
Created attachment 230421 [details]
diffs - add rundir to ds
Comment 6 Nathan Kinder 2007-10-17 18:14:25 EDT
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.
Comment 7 Rich Megginson 2007-10-17 18:34:03 EDT
Created attachment 230431 [details]
diffs with snmp
Comment 8 Nathan Kinder 2007-10-17 19:24:57 EDT
Looks good!
Comment 9 Rich Megginson 2007-10-17 21:22:59 EDT
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.
Comment 10 Rich Megginson 2007-10-17 21:24:13 EDT
David, we need to document the new attribute nsslapd-rundir in cn=config -
Command and File Reference?
Comment 11 Rich Megginson 2007-10-17 21:43:46 EDT
Created attachment 230541 [details]
cvs commit log - make nsslapd-tmpdir /tmp

Fix Description: Move the default nsslapd-tmpdir to /tmp.
Comment 12 Rich Megginson 2008-01-14 12:22:53 EST
Fixed in Fedora DS 1.1.0

Note You need to log in before you can comment on or make changes to this bug.