Hi,
I am currently trying to initialize the back-config database by slapadd-ing a small ldif-File (based on the slapd.ldif from CVS HEAD). However I ran into various issues with regard to the ordering of the different database objects and it unclear to me how exactly this is supposed to work. The sample slapd.ldif from CVS does not contain any ordering information (the "{digit}" string). It can be slapadd-ed it with out any problem. But after starting slapd (or any slaptool) I see some strange effects, e.g. I suddenly have two frontend-databases in back-config (one with index -1 and the other without any index). In order to try to fix this I'd like to find out how slapadd-ing back-config databases is supposed to work.
1. Should slapadd work with LDIF files that do not have any ordering numbers for the databases in them?
2. Should slapadd work with LDIF files that does not explicitly contain the mandatory cn=frontend and cn=config databases?
I'd assume yes as the answer for both questions. The current code however shows all kinds of weird behaviour with regard to both points and I'd like to fix that.
Ralf Haferkamp wrote:
Hi,
I am currently trying to initialize the back-config database by slapadd-ing a small ldif-File (based on the slapd.ldif from CVS HEAD). However I ran into various issues with regard to the ordering of the different database objects and it unclear to me how exactly this is supposed to work. The sample slapd.ldif from CVS does not contain any ordering information (the "{digit}" string). It can be slapadd-ed it with out any problem. But after starting slapd (or any slaptool) I see some strange effects, e.g. I suddenly have two frontend-databases in back-config (one with index -1 and the other without any index). In order to try to fix this I'd like to find out how slapadd-ing back-config databases is supposed to work.
- Should slapadd work with LDIF files that do not have any ordering numbers
for the databases in them?
- Should slapadd work with LDIF files that does not explicitly contain the
mandatory cn=frontend and cn=config databases?
I'd assume yes as the answer for both questions. The current code however shows all kinds of weird behaviour with regard to both points and I'd like to fix that.
Yes, both of those are supposed to work. They were fine the last time I looked, haven't checked HEAD recently.
On Wednesday 21 March 2007 19:40, Howard Chu wrote:
Ralf Haferkamp wrote:
[..]
- Should slapadd work with LDIF files that do not have any ordering
numbers for the databases in them?
- Should slapadd work with LDIF files that does not explicitly contain
the mandatory cn=frontend and cn=config databases?
I'd assume yes as the answer for both questions. The current code however shows all kinds of weird behaviour with regard to both points and I'd like to fix that.
Yes, both of those are supposed to work. They were fine the last time I looked, haven't checked HEAD recently.
I am bit stuck with it as the observed behaviour is really weird. E.g. take the folling LDIF fine: ------------------------ dn: cn=config objectClass: olcGlobal cn: config
dn: cn=schema,cn=config objectClass: olcSchemaConfig cn: schema
include: file:///[...]/core.ldif
dn: olcDatabase=bdb,cn=config objectClass: olcDatabaseConfig objectClass: olcBdbConfig olcDatabase: bdb olcSuffix: dc=my-domain,dc=com olcRootDN: cn=Manager,dc=my-domain,dc=com olcRootPW: secret olcDbDirectory: /var/lib/ldap/ olcDbIndex: objectClass eq -------------------------
After slapadd I have these files in my config directory: ------------------------- slapd.d/ slapd.d/cn=config slapd.d/cn=config/cn=schema slapd.d/cn=config/cn=schema/cn={0}core.ldif slapd.d/cn=config/olcDatabase=bdb.ldif slapd.d/cn=config/cn=schema.ldif slapd.d/cn=config.ldif -------------------------
Note the missing index in olcDatabase=bdb.ldif and the missing frontend and config Databases. Shouldn't the frontend and config Database be already created during slapdd?
When I startup slapd with that configuration the frontend and config database are created automatically, but the bdb-Database doesn't still an number.
On Friday 23 March 2007 15:08, Ralf Haferkamp wrote:
On Wednesday 21 March 2007 19:40, Howard Chu wrote:
Ralf Haferkamp wrote:
[..]
- Should slapadd work with LDIF files that do not have any ordering
numbers for the databases in them?
- Should slapadd work with LDIF files that does not explicitly contain
the mandatory cn=frontend and cn=config databases?
I'd assume yes as the answer for both questions. The current code however shows all kinds of weird behaviour with regard to both points and I'd like to fix that.
Yes, both of those are supposed to work. They were fine the last time I looked, haven't checked HEAD recently.
[..]
slapd.d/ slapd.d/cn=config slapd.d/cn=config/cn=schema slapd.d/cn=config/cn=schema/cn={0}core.ldif slapd.d/cn=config/olcDatabase=bdb.ldif slapd.d/cn=config/cn=schema.ldif slapd.d/cn=config.ldif
Note the missing index in olcDatabase=bdb.ldif and the missing frontend and config Databases. Shouldn't the frontend and config Database be already created during slapadd?
I just commited code to HEAD that implements that behavior. (Creating {-1}frontend and {0}config if they do not exist when the first olcDatabase-Entry is slapadded). Would be nice if someone could review that code.