Issue 6749 - Shut up "configure monitor database to enable"
Summary: Shut up "configure monitor database to enable"
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.23
Hardware: All All
: --- normal
Target Milestone: 2.5.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 12:39 UTC by Hallvard Furuseth
Modified: 2020-10-14 21:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Hallvard Furuseth 2010-12-15 12:39:11 UTC
Full_Name: Hallvard B Furuseth
Version: 2.4.23
OS: 
URL: 
Submission from: (NULL) (129.240.6.233)
Submitted by: hallvard


Please don't give the "configure monitor database to enable" message
by default.

Either just remove it, or better, stop cn=config from adding a default
olcMonitoring: TRUE attribute to olcDatabase objects.  (The flag value
can still default to True if the attribute is absent.)  Then you can
give the message if the _admin_ has explicitly asked for monitoring,
instead of if slapd has asked for it.
Comment 1 ando@openldap.org 2011-01-02 14:04:16 UTC
> Full_Name: Hallvard B Furuseth
> Version: 2.4.23
> OS:
> URL:
> Submission from: (NULL) (129.240.6.233)
> Submitted by: hallvard
>
>
> Please don't give the "configure monitor database to enable" message
> by default.
>
> Either just remove it, or better, stop cn=config from adding a default
> olcMonitoring: TRUE attribute to olcDatabase objects.  (The flag value
> can still default to True if the attribute is absent.)  Then you can
> give the message if the _admin_ has explicitly asked for monitoring,
> instead of if slapd has asked for it.

I disagree; it is not cn=config that defaults database monitoring to TRUE;
actually, it's back-bdb/back-hdb that sets its own monitoring to TRUE as
soon as back-monitor support is compiled and the specific backend
monitoring is successfully initilized.

Maybe this warning can be demoted to LDAP_DEBUG_CONFIG instead of
LDAP_DEBUG_ANY.  I understand that one could presume that the lack of
database monitor in the configuration indicates that monitoring is not
desired; this warning, however, tries to address a typical configuration
error, when admins just forget to configure it.

p.

Comment 2 Hallvard Furuseth 2011-01-29 22:50:10 UTC
masarati@aero.polimi.it writes:
>> Please don't give the "configure monitor database to enable" message
>> by default.
>>
>> Either just remove it, or better, stop cn=config from adding a default
>> olcMonitoring: TRUE attribute to olcDatabase objects.  (The flag value
>> can still default to True if the attribute is absent.)  Then you can
>> give the message if the _admin_ has explicitly asked for monitoring,
>> instead of if slapd has asked for it.
> 
> I disagree; it is not cn=config that defaults database monitoring to TRUE;
> actually, it's back-bdb/back-hdb that sets its own monitoring to TRUE as
> soon as back-monitor support is compiled and the specific backend
> monitoring is successfully initilized.

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:

> I understand that one could presume that the lack of database monitor
> in the configuration indicates that monitoring is not desired; this
> warning, however, tries to address a typical configuration error, when
> admins just forget to configure it.

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:-)

-- 
Hallvard

Comment 3 Quanah Gibson-Mount 2017-04-07 23:46:39 UTC
moved from Incoming to Software Enhancements
Comment 4 Quanah Gibson-Mount 2020-09-18 18:39:12 UTC
Commits: 
  • bc021bb2 
by Quanah Gibson-Mount at 2020-09-18T14:56:43+00:00 
ITS#6749 - Change configure monitor warning to DEBUG CONFIG instead of DEBUG ANY