bind-formula icon indicating copy to clipboard operation
bind-formula copied to clipboard

Disable query logging default

Open ixs opened this issue 5 years ago • 4 comments

By default, the bind formula will configure the named process to write all queries into a query.log file which potentially is outside the normal log-rotated dirs, thus filling up the disk.

This is rather unexpected on high traffic DNS servers.

Disable by default, can be explicity reenabled by setting enable_logging to True.

Rework jinja logic to make enable_logging and use_extensive_logging mutually exclusive rather than having them "stacked". It makes no sense to have the fine-grained use_extensive_logging configuration depend on the coarse-grained enable_logging toggle.

I am actually tempted to rename enable_logging to enable_query_log which is a much clearer description of the functionality. Comments? Somewhat related, log_dir is /var/log/something for every OS except Red Hat where it is defined as /var/named/data... Any reason not to fix that inconsistency other than the use of the chrooted functionality on Red Hat?

ixs avatar May 03 '19 22:05 ixs

I like the approach you took, it LGTM :+1:

rename enable_logging to enable_query_log My only concern is backward compatibility, which we're trying to respect lately in the formulas. I'd say one possibility would be to

  1. add a new parameter enable_query_log which effectively controls the query logging (what you propose)
  2. if the old parameter enable_logging is set: 2.a. set enable_query_log to the value on enable_logging (for backward compatibility) 2.b. trigger a deprecation warning message for the parameter enable_logging

Perhaps this can be done in another PR

javierbertoli avatar May 03 '19 23:05 javierbertoli

@javierbertoli Did that. As there's no pillar.set (contrary to grains.set) I did a bit of a workaround.

Have a look, should be passing checks now as well.

ixs avatar May 04 '19 00:05 ixs

@javierbertoli ping?

ixs avatar May 08 '19 14:05 ixs

Hi there! Any news?

n-rodriguez avatar Jan 13 '20 19:01 n-rodriguez