Bug 250179

Summary: tmpwatch whacks stats
Product: [Fedora] Fedora Reporter: Dennis Gilmore <dennis>
Component: 389-ds-baseAssignee: Rich Megginson <rmeggins>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 6CC: daobrien, dennis, nkinder, ssorce
Target Milestone: ---Keywords: screened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.1.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-01-14 17:22:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 240316    
Attachments:
Description Flags
diffs - add rundir to ds
none
diffs with snmp
none
cvs commit log
none
cvs commit log - make nsslapd-tmpdir /tmp none

Description Dennis Gilmore 2007-07-30 21:31:01 UTC
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:

Comment 1 Rich Megginson 2007-10-17 18:36:50 UTC
Nathan, is this still a problem in the latest code?

Comment 2 Nathan Kinder 2007-10-17 18:50:41 UTC
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 19:50:10 UTC
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

Comment 4 Rich Megginson 2007-10-17 19:55:11 UTC
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 22:01:17 UTC
Created attachment 230421 [details]
diffs - add rundir to ds

Comment 6 Nathan Kinder 2007-10-17 22:14:25 UTC
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 22:34:03 UTC
Created attachment 230431 [details]
diffs with snmp

Comment 8 Nathan Kinder 2007-10-17 23:24:57 UTC
Looks good!

Comment 9 Rich Megginson 2007-10-18 01:22:59 UTC
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-18 01:24:13 UTC
David, we need to document the new attribute nsslapd-rundir in cn=config -
Command and File Reference?

Comment 11 Rich Megginson 2007-10-18 01:43:46 UTC
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 17:22:53 UTC
Fixed in Fedora DS 1.1.0