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

Re: (ITS#4789) can't add BDB database when monitoring

Pierangelo Masarati wrote:
> hyc@symas.com wrote:
>> hyc@OpenLDAP.org wrote:
>>> I presume there's some kind of callback for registering new suffixes 
>>> but I
>>> haven't looked very hard.
>> This highlights some other issues lurking in here - back-monitor 
>> basically doesn't deal with dynamic configuration well at all. It 
>> assumes that all databases and overlays have been fully configured by 
>> the time it starts - an assumption that was valid for old-style 
>> slapd.conf use, but not with back-config.
>> The monitor_subsys_database_init_one() function probably needs to be 
>> split into separate pieces so that database and overlay info can be 
>> set up and removed incrementally.
> The point is that back-monitor has no clean means to detect what 
> database is serving what naming context, since it was designed way ahead 
> of back-config.  So when time came to introduce monitor customization, 
> the best mechanism I could find was the extended filter on the naming 
> context.  This is really creating trouble. The best solution would be to 
> re-design back-monitor so that the database section mimics back-config 
> using X-ORDERED 'SIBLING' style (and is updated accordingly, especially 
> when entry renaming will be supported by back-config).
> The X-ORDERED 'SIBLING' could be used throughout back-monitor, to get 
> rid of those "cn=Database X", "cn=Overlay Y" stuff and so.

One approach would be to add a pointer to the backend struct that points to 
its cn=config entry. Then back-monitor can simply pull the DN from there and 
strip the cn=config suffix.

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