Bug 224606 - Instance specific dirs should be in instance directory
Instance specific dirs should be in instance directory
Product: 389
Classification: Community
Component: Install/Uninstall (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Rich Megginson
Viktor Ashirov
Depends On:
Blocks: 152373 240316 FDS1.1.0
  Show dependency treegraph
Reported: 2007-01-26 12:43 EST by Rich Megginson
Modified: 2015-12-07 12:14 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 12:14:50 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 to create additional instance dirs (14.13 KB, patch)
2007-01-26 12:45 EST, Rich Megginson
no flags Details | Diff

  None (edit)
Description Rich Megginson 2007-01-26 12:43:52 EST
In order to "fedora-ize" the file/dir layout, the instance specific directory
should always be a child of the product name directory.  This means the
following directories will be moved:
/var/lock/slapd-instance -> /var/lock/fedora-ds/slapd-instance
/var/lib/slapd-instance -> /var/lib/fedora-ds/slapd-instance
/var/log/slapd-instance -> /var/log/fedora-ds/slapd-instance
/var/run/slapd-instance -> /var/run/fedora-ds
the last one is a special case.  fedora prefers the pid files to be named
name.pid e.g. slapd-instance.pid rather than have a subdir with a file called
pid.  This also means some additional code in order to make /var/run/fedora-ds
secure yet still writable by the server userid (e.g. nobody:nobody).
Comment 1 Rich Megginson 2007-01-26 12:45:14 EST
Created attachment 146695 [details]
diffs to create additional instance dirs
Comment 2 Noriko Hosoi 2007-01-26 14:30:31 EST
Looks good.
Comment 3 Rich Megginson 2007-01-26 15:01:36 EST
Reviewed by: nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Fixed create instance to create these instance specific
/var/lock/slapd-instance -> /var/lock/fedora-ds/slapd-instance
/var/lib/slapd-instance -> /var/lib/fedora-ds/slapd-instance
/var/log/slapd-instance -> /var/log/fedora-ds/slapd-instance
/var/run/slapd-instance -> /var/run/fedora-ds
For now, I'm side-stepping the question of what to do about permissions on
/var/run/fedora-ds/slapd-instance.pid - we'll address this in the RPM creation.
I've also moved the migration scripts to the %{_libdir}/fedora-ds/slapd-instance
directory, and I've made the default directory for the key/cert db the same as
the config directory.  I think the dynamic nature of their configuration
warrants the move.
Platforms tested: RHEL4
Flag Day: no
Doc impact: no 

Checking in ldapserver/ldap/admin/lib/dsalib_updown.c;
/cvs/dirsec/ldapserver/ldap/admin/lib/dsalib_updown.c,v  <--  dsalib_updown.c
new revision: 1.9; previous revision: 1.8
Checking in ldapserver/ldap/admin/src/create_instance.c;
/cvs/dirsec/ldapserver/ldap/admin/src/create_instance.c,v  <--  create_instance.c
new revision: 1.41; previous revision: 1.40
Checking in ldapserver/ldap/admin/src/scripts/template-start-slapd.in;
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-start-slapd.in,v  <-- 
new revision: 1.4; previous revision: 1.3
Checking in ldapserver/ldap/admin/src/scripts/template-stop-slapd.in;
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-stop-slapd.in,v  <-- 
new revision: 1.4; previous revision: 1.3
Comment 4 Noriko Hosoi 2007-01-29 18:57:52 EST
In the diffs of Comment #1, 
Index: ldapserver/ldap/admin/lib/dsalib_updown.c
RCS file: /cvs/dirsec/ldapserver/ldap/admin/lib/dsalib_updown.c,v
retrieving revision 1.8
diff -u -8 -r1.8 dsalib_updown.c
--- ldapserver/ldap/admin/lib/dsalib_updown.c	10 Nov 2006 23:44:32 -0000	1.8
+++ ldapserver/ldap/admin/lib/dsalib_updown.c	26 Jan 2007 17:40:14 -0000
@@ -90,17 +90,17 @@
-    PR_snprintf(pid_file_name, BIG_LINE, "%s/pid", rundir);
+    PR_snprintf(pid_file_name, BIG_LINE, "%s/%s.pid", ds_get_server_name(),

You actually meant this, didn't you? ;)
+    PR_snprintf(pid_file_name, BIG_LINE, "%s/%s.pid", rundir,

With the above change, I could make quickinstall PASS again.
Test Name            PASS       FAIL     NORESULT
quickinstall startup 100% (1/1) 	  	 
Comment 5 Rich Megginson 2007-01-29 19:08:36 EST
Yep.  Thanks Noriko!

Checking in dsalib_updown.c;
/cvs/dirsec/ldapserver/ldap/admin/lib/dsalib_updown.c,v  <--  dsalib_updown.c
new revision: 1.10; previous revision: 1.9

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