masarati@aero.polimi.it writes:
If the admin put 'olcMonitoring: TRUE' in slapd.d but did not include database monitor, that would be poor user config.
I'm fine with having bdb set the internal default flag value to TRUE. My protest in that context is against slapd - be it back-bdb or back-config which is to blame - writing the default value to the cn=config LDIF even though the admin never mentioned monitoring.
This means that neither the TRUE value of the internal flag nor the presence of the attribute is an indication that the admin asked for monitoring (i.e. set the flag) but forgot to add database monitor.
Maybe this warning can be demoted to LDAP_DEBUG_CONFIG instead of LDAP_DEBUG_ANY.
Yes. Maybe slapd should nag the admin more about bad config, but if so there are plenty of other things which are more important than this and should get a chance to nag the admin before this particular flag gets to do it. IIRC the only other thing which gets to do that now is BDB without DB_CONFIG - which makes sense since that's an entire non-OpenLDAP subsystem which has not been configured.
But also:
No, this is a broken slapd default. It should not be an admin error to not mention a feature he does not want and does not need to know about.
And if slapd does nag anyone about it, it should nag admins who do mention either database monitor or the flag, not admins who do not.
So slapd should be quiet if it set the flag internally and the admin does not include database monitor. Thus my suggestion to set the flag internally by default but only nag the admin if it was set in cn=config.
Unless olcMonitoring:TRUE is a drain on performance or something so it really ought to be off when the data is not used anyway.
An alternative (and a change in behavior from now) if you really want this warning, would be to always default monitoring to off. That'll surprise existing users, so the cn=monitor objects could contain some text 'monitoring off for this database, set olcMonitoring to enable'. Personally I don't think a warning is worth such a change in behavior, but then I don't like the warning anyway:-)