[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#3979) glue mixtures can confuse slapadd
Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Linux
URL:
Submission from: (NULL) (129.240.186.42)
Submitted by: hallvard
Problems with glue + unique + ldbm + slapadd, and
glue + database not supporting slapadd + database supporting slapadd:
include ..../schema/core.schema
database ldbm
suffix cn=foo,o=bar
directory /tmp/db/foo
overlay unique
unique_attributes uid
database ldbm
suffix o=bar
directory /tmp/db/bar
overlay glue
glue-sub cn=foo,o=bar
Now slapadd -b "cn=foo,o=bar" works, but slapadd -d-1 -b "o=bar" says:
slapadd startup: initiated.
backend_startup_one: starting "cn=foo,o=bar"
unique_open: overlay initialized
backend_startup: bi_open failed!
slap_startup failed
It works if ldbm is replaced with bdb, or if the unique overlay is removed.
Another weirdness:
database bdb
suffix cn=baz,cn=system,dc=uio,dc=no
directory /tmp/db/uio
database ldap
suffix cn=system,dc=uio,dc=no
uri ldap://ldap.uio.no/
overlay glue
glue-sub cn=baz,cn=system,dc=uio,dc=no
slapadd -b"cn=system,dc=uio,dc=no" </dev/null succeeds, though attempting
to add the cn=system entry fails at it should. I thought maybe the success
was because at least one of the glued databases supports slapadd, but no:
database ldap
suffix cn=people,dc=uio,dc=no
uri ldap://ldap.uio.no/
database bdb
suffix dc=uio,dc=no
directory /tmp/db/uio
overlay glue
glue-sub cn=people,dc=uio,dc=no
slapadd -b"cn=people,dc=uio,dc=no" fails.
Whatever the logic is here, it needs at least to be documented.
Also, slapadd -w -b"c=uio,dc=no" segfaults:
(gdb) bt
#0 0x00000000 in ?? ()
#1 0x080edcc2 in slapadd (argc=6, argv=0xbffff5a4) at slapadd.c:329
#2 0x0806ef06 in main (argc=6, argv=0xbffff5a4) at main.c:282
(gdb) frame 1
#1 0x080edcc2 in slapadd (argc=6, argv=0xbffff5a4) at slapadd.c:329
329 ctxcsn_id = be->be_dn2id_get( be, be->be_nsuffix );
I can't coax any data out of gdb, but I guess be->be_dn2id_get == 0.
In any case, it needs to be documented that slapadd to a glued
database opens all the glued databases, if that's the idea. That
feature gave me a bit of a surprise at first. An option to only
open the specified database and not glued ones would also be useful.
On the other hand, now that we get run-time configuration and slapadd can
open several databases, I wonder if we could eventually get an option to
not specify the database at all, and just let slapadd open databases as
it needs them while reading the LDIF file.