bind-formula
bind-formula copied to clipboard
Disable query logging default
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?
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
- add a new parameter
enable_query_log
which effectively controls the query logging (what you propose) - if the old parameter
enable_logging
is set: 2.a. setenable_query_log
to the value onenable_logging
(for backward compatibility) 2.b. trigger a deprecation warning message for the parameterenable_logging
Perhaps this can be done in another PR
@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.
@javierbertoli ping?
Hi there! Any news?