Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 224606 - Instance specific dirs should be in instance directory
Summary: Instance specific dirs should be in instance directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Install/Uninstall
Version: 1.0.4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: FDS1.1.0
TreeView+ depends on / blocked
 
Reported: 2007-01-26 17:43 UTC by Rich Megginson
Modified: 2015-12-07 17:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 17:14:50 UTC


Attachments (Terms of Use)
diffs to create additional instance dirs (deleted)
2007-01-26 17:45 UTC, Rich Megginson
no flags Details | Diff

Description Rich Megginson 2007-01-26 17:43:52 UTC
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 17:45:14 UTC
Created attachment 146695 [details]
diffs to create additional instance dirs

Comment 2 Noriko Hosoi 2007-01-26 19:30:31 UTC
Looks good.

Comment 3 Rich Megginson 2007-01-26 20:01:36 UTC
Reviewed by: nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: Fixed create instance to create these instance specific
directories:
/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
done
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
done
Checking in ldapserver/ldap/admin/src/scripts/template-start-slapd.in;
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-start-slapd.in,v  <-- 
template-start-slapd.in
new revision: 1.4; previous revision: 1.3
done
Checking in ldapserver/ldap/admin/src/scripts/template-stop-slapd.in;
/cvs/dirsec/ldapserver/ldap/admin/src/scripts/template-stop-slapd.in,v  <-- 
template-stop-slapd.in
new revision: 1.4; previous revision: 1.3
done


Comment 4 Noriko Hosoi 2007-01-29 23:57:52 UTC
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(),
rundir);
[...]

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

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-30 00:08:36 UTC
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
done



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