Bug 248145
Description
Rich Megginson
2007-07-13 13:47:59 UTC
Created attachment 159175 [details]
new DSCreate module
Created attachment 159176 [details]
mapper for dscreate
Created attachment 159177 [details]
mapper for dsorgentries
Created attachment 159178 [details]
template for restart-slapd
Created attachment 159179 [details]
template for base ACIs
Created attachment 159181 [details]
template for country entries
Created attachment 159182 [details]
template for domain entries
Created attachment 159183 [details]
template for locality entries
Created attachment 159184 [details]
template for organization entries
Created attachment 159185 [details]
template for orgunit entries
Created attachment 159186 [details]
template for state entries
Created attachment 159187 [details]
diffs for ldapserver
Created attachment 159188 [details]
diffs for adminserver
Your new implementation looks good to me. After switching to the new DSCreate module, are we dropping ds_newinst all together including ds_newinst.pl? (In reply to comment #14) > Your new implementation looks good to me. > > After switching to the new DSCreate module, are we dropping ds_newinst all > together including ds_newinst.pl? I think we should just get rid of ds_newinst.pl - setup-ds.pl does the same and more. setup-ds.pl -s -f file.inf is the same as ds_newinst.pl file.inf Created attachment 159227 [details]
cvs commit log - ldapserver
Reviewed by: nhosoi (Thanks!)
Files: see diff
Branch: HEAD
Fix Description: The time has come. We can finally get rid of the instance
creation C code
once and for all. I've created a DSCreate module that has all of the
functionality of the old
create_instance.c code, along with a few items from ldap/admin/lib. The way it
works is
this: it first creates the dse.ldif file using template-dse.ldif and the
suffix-db template to
create the initial db and suffix. It then adds additional optional
configuration depending
on what optional features have been enabled. It creates other config files and
copies in
the schema. It then initializes the database. It uses a template file based
on the type of
entry implied by the suffix, then adds the default ACIs. If the user chose to
do so, it
will also create the ou=people, ou=groups, etc. entries. The user can also
supply an LDIF
file which will be used to populate the initial database, in which case none of
the default
entries or ACIs will be used. It then starts the server (if desired).
I had to create a function makePaths that works like mkdir -p except that it
will chown,
chgrp, and chmod all paths created.
I had to change the other places where instance creation was called to use the
new
calling semantics. ds_create changed quite a bit, since it can just use an Inf
to pass in the
information instead of calling ds_newinst as a CGI program.
I had to change FileConn to add support for namingContexts (i.e. entries with
no parent),
and to have it write each change each time, and to return copies of entries
when searching,
to avoid modifying the tree in place. This makes it act much more like LDAP.
I found and fixed a few bugs in Migration along the way that were revealed
while integrating
the new DSCreate code.
Platforms tested: RHEL4, FC6
Flag Day: Yes. New instance creation code and autotool changes.
Doc impact: no
QA impact: should be covered by regular nightly and manual testing
New Tests integrated into TET: none
Created attachment 159228 [details]
cvs commit log - ldapserver
Created attachment 159230 [details]
cvs commit log - adminserver
Created attachment 159234 [details]
more commits - ldapserver
Fix Description: 1) Inf needs to be able to read the .inf file from stdin.
This is what ds_newinst.pl does currently.
2) getlogin seems not to work in all cases, so add a more robust replacement.
Platforms tested: RHEL4, FC6
Created attachment 159235 [details]
more commits - adminserver
Created attachment 159550 [details]
removed files
Created attachment 159551 [details]
diffs to remove files
Created attachment 159552 [details]
diffs to fix exit code
Great! So, we don't have 2 copies of libds_admin any more! Created attachment 159558 [details]
cvs commit log - removal
Reviewed by: nhosoi (Thanks!)
Fix Description: This is my favorite part - removing all of the now dead code.
I also had to fix the exit code so that you could use $? to test for the
success or failure of the new setup scripts.
Platforms tested: RHEL4, FC6
Flag Day: no
Doc impact: no
fedora-ds-base-1.1.0-0.3.20070720.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. Chandra, Fedora has marked this as CLOSED, but I assume you would still want this bug to go through the DS8.0 QA process? yes , please leave the bugs in Fedora in MODIFIED state so that we will pick it up and move it to VERIFIED when we get to the bug verification cycle. |