[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#7581) adding meta backend in cn=config with ldapadd / ldapmodify



dcoutadeur@linagora.com wrote:
> Full_Name: dcoutadeur
> Version: 2.4.35 / git
> OS: openSuse 11.3 x86_64
> URL:
> Submission from: (NULL) (80.67.162.201)
>
>
> I apologize in advance if this is not considered as a bug, but I thought this
> ticket should help the community anyway...
>
> The problem is that it seems impossible to add meta backend in cn=config thanks
> to ldapadd / ldapmodify clients. I thought the major interest for cn=config was
> precisely to let administrators change the configuration in a remote way, but
> maybe new database configuration is an exception ?

Seems we need some rework here to allow this case. Currently bconfig assumes 
that the olcDatabaseConfig entry is sufficient by itself, and any child 
entries underneath are just optional. It doesn't handle the case where the 
olcDatabaseConfig entry is basically an incomplete config.
>
> Here are the technical elements :
>
> Content of meta.ldif :
>
> dn: olcDatabase={2}meta,cn=config
> objectClass: olcDatabaseConfig
> objectClass: olcMetaConfig
> olcDatabase: {2}meta
> olcSuffix: dc=foo,dc=com
>
> debug information in slapd, after the command :
> ldapadd -H "ldap://localhost:389"; -D "cn=config" -W -f meta.ldif
>
> 518220f1 conn=1002 op=1 ADD dn="olcDatabase={2}meta,cn=config"
> 518220f1 meta_back_db_open: no targets defined
> 518220f1 backend_startup_one (type=meta, suffix="dc=foo,dc=com"): bi_db_open
> failed! (1)
> 518220f1 olcSuffix: value #0: <olcSuffix> failed startup (dc=foo,dc=com)!
>
> However, I can add this entry via slapadd :
>
> dn: olcDatabase={2}meta,cn=config
> objectClass: olcDatabaseConfig
> objectClass: olcMetaConfig
> olcDatabase: {2}meta
> olcSuffix: dc=foo,dc=com
> olcAddContentAcl: FALSE
> olcLastMod: TRUE
> olcMaxDerefDepth: 15
> olcReadOnly: FALSE
> olcSyncUseSubentry: FALSE
> olcMonitoring: FALSE
> olcDbOnErr: continue
> olcDbPseudoRootBindDefer: TRUE
> olcDbSingleConn: FALSE
> olcDbUseTemporaryConn: FALSE
> olcDbConnectionPoolMax: 16
> olcDbBindTimeout: 100000
> olcDbCancel: abandon
> olcDbChaseReferrals: FALSE
> olcDbNoRefs: FALSE
> olcDbNoUndefFilter: FALSE
> olcDbNretries: 10
> olcDbProtocolVersion: 3
> olcDbRebindAsUser: FALSE
> olcDbSessionTrackingRequest: FALSE
> olcDbTFSupport: no
> structuralObjectClass: olcMetaConfig
> entryUUID: cf8afa3a-a284-4ac8-b60e-9431b0807ed4
> creatorsName: cn=config
> createTimestamp: 20130430162302Z
> entryCSN: 20130430162302.509672Z#000000#000#000000
> modifiersName: cn=config
> modifyTimestamp: 20130430162302Z
>
> The fact is I don't have a metatarget configuration, because this is a subentry
> of olcDatabase={2}meta,cn=config, thus I must add the latter entry first.
>
>
> Also notice that I can't do a slapadd with just the meta configuration. (the
> ldif above). If I do this, I have an error :
> slapadd: could not add entry dn="olcDatabase={2}meta,cn=config" (line=1):
> autocreation of "olcDatabase={-1}frontend" failed
>
> I had to make a backup of the full configuration, and then add the meta
> configuration and import the resulting file.
>
>


-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/