]> git.sur5r.net Git - openldap/commitdiff
add indexes when supported; syncrepl on configuration should always be refreshAndPersist
authorPierangelo Masarati <ando@openldap.org>
Sun, 16 Nov 2008 23:06:30 +0000 (23:06 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 16 Nov 2008 23:06:30 +0000 (23:06 +0000)
tests/scripts/test049-sync-config
tests/scripts/test050-syncrepl-multimaster

index 1eac3fa485836efd3018d226b3e47850b2b45925..1b2629b3d9e27cb550c1d651e3140a9393dec81d 100755 (executable)
@@ -113,7 +113,7 @@ dn: olcDatabase={0}config,cn=config
 changetype: modify
 add: olcSyncRepl
 olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 -
 add: olcUpdateRef
@@ -170,7 +170,7 @@ dn: olcDatabase={0}config,cn=config
 changetype: modify
 add: olcSyncRepl
 olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 -
 add: olcUpdateRef
index 3b612000e7383ede38d8a34f924ed0f583961960..c3a7d8f42fcaff8e4e49c7cde18172f7a89707b0 100755 (executable)
@@ -172,13 +172,13 @@ dn: olcDatabase={0}config,cn=config
 changetype: modify
 add: olcSyncRepl
 olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 -
 add: olcMirrorMode
@@ -228,13 +228,13 @@ dn: olcDatabase={0}config,cn=config
 changetype: modify
 add: olcSyncRepl
 olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 -
 add: olcMirrorMode
@@ -278,13 +278,13 @@ dn: olcDatabase={0}config,cn=config
 changetype: modify
 add: olcSyncRepl
 olcSyncRepl: rid=001 provider=$URI1 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=002 provider=$URI2 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 olcSyncRepl: rid=003 provider=$URI3 binddn="cn=config" bindmethod=simple
-  credentials=$CONFIGPW searchbase="cn=config" $SYNCTYPE
+  credentials=$CONFIGPW searchbase="cn=config" type=refreshAndPersist
   retry="5 5 300 5" timeout=3
 -
 add: olcMirrorMode
@@ -359,6 +359,24 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+case $BACKEND in
+bdb | hdb)
+       $LDAPMODIFY -D cn=config -H $URI1 -y $CONFIGPWF <<EOF >>$TESTOUT 2>&1
+dn: olcDatabase={1}$BACKEND,cn=config
+changetype: modify
+add: olcDbIndex
+olcDbIndex: objectClass,entryUUID,entryCSN eq
+olcDbIndex: cn,uid pres,eq,sub
+EOF
+       RC=$?
+       if test $RC != 0 ; then
+               echo "ldapadd modify for database config ($RC)!"
+               test $KILLSERVERS != no && kill -HUP $KILLPIDS
+               exit $RC
+       fi
+       ;;
+esac
+
 echo "Using ldapadd to populate producer..."
 $LDAPADD -D "$MANAGERDN" -H $URI1 -w $PASSWD -f $LDIFORDERED \
        >> $TESTOUT 2>&1