------------
- reduce validation strictness for domain names (#934, !1727)
+Incompatible changes
+--------------------
+- Removed options from declarative configuration model (YAML).
+ These are mostly experimental and debugging/testing options that are not useful for general users (remain in Lua):
+ - /logging/debugging
+
Knot Resolver 6.0.15 (2025-07-17)
=================================
],
"description": "Logging DNS requests and responses to a unix socket.",
"default": false
- },
- "debugging": {
- "description": "Advanced debugging parameters for kresd (Knot Resolver daemon).",
- "type": "object",
- "properties": {
- "assertion-abort": {
- "type": "boolean",
- "description": "Allow the process to be aborted in case it encounters a failed assertion.",
- "default": false
- },
- "assertion-fork": {
- "type": "string",
- "pattern": "^(\\d+)(us|ms|s|m|h|d)$",
- "description": "Fork and abord child kresd process to obtain a coredump, while the parent process recovers and keeps running.",
- "default": "5m"
- }
- },
- "default": {
- "assertion_abort": false,
- "assertion_fork": "5m"
- }
}
},
"default": {
"target": "stdout",
"groups": null,
"dnssec_bogus": false,
- "dnstap": false,
- "debugging": {
- "assertion_abort": false,
- "assertion_fork": "5m"
- }
+ "dnstap": false
}
},
"monitoring": {
+++ /dev/null
-.. SPDX-License-Identifier: GPL-3.0-or-later
-
-Debugging options
-=================
-
-In case the resolver crashes, it is often helpful to collect a coredump from
-the crashed process. Configuring the system to collect coredump from crashed
-process is out of the scope of this documentation, but some tips can be found
-`here <https://lists.nic.cz/hyperkitty/list/knot-resolver-users@lists.nic.cz/message/GUHW4JSDXZ6SZUAYYQ3U2WWOZEIVVF2S/>`_.
-
-Kresd uses its own mechanism for assertions. They are checks that should always
-pass and indicate some weird or unexpected state if they don't. In such cases,
-they show up in the log as errors. By default, the process recovers from those
-states if possible, but the behaviour can be changed with the following options
-to aid further debugging.
-
-.. option:: logging/debugging:
-
- .. option:: assertion-abort: true|false
-
- :default: false
-
- Allow the process to be aborted in case it encounters a failed assertion.
- (Some critical conditions always lead to abortion, regardless of settings.)
-
- .. option:: assertion-fork: <time ms|s|m|h|d>
-
- :default: 5m
-
- If a process should be aborted, it can be done in two ways. When this is
- set to nonzero (default), a child is forked and aborted to obtain a coredump,
- while the parent process recovers and keeps running. This can be useful to
- debug a rare issue that occurs in production, since it doesn't affect the
- main process.
-
- As the dumping can be costly, the value is a lower bound on delay between
- consecutive coredumps of each process. It is randomized by +-25% each time.
-
-.. code-block:: yaml
-
- logging:
- debugging:
- assertion-abort: true
- assertion-fork: 10m
config-ta-signal-query
config-time-skew-detection
config-time-jump-detection
- config-logging-debugging
import os
from typing import Any, List, Literal, Optional, Set, Type, Union, cast
-from knot_resolver.datamodel.types import TimeUnit, WritableFilePath
+from knot_resolver.datamodel.types import WritableFilePath
from knot_resolver.utils.modeling import ConfigSchema
from knot_resolver.utils.modeling.base_schema import is_obj_type_valid
log_tcp_rtt: bool = True
-class DebuggingSchema(ConfigSchema):
- """
- Advanced debugging parameters for kresd (Knot Resolver daemon).
-
- ---
- assertion_abort: Allow the process to be aborted in case it encounters a failed assertion.
- assertion_fork: Fork and abord child kresd process to obtain a coredump, while the parent process recovers and keeps running.
- """
-
- assertion_abort: bool = False
- assertion_fork: TimeUnit = TimeUnit("5m")
-
-
class LoggingSchema(ConfigSchema):
class Raw(ConfigSchema):
"""
groups: List of groups for which 'debug' logging level is set.
dnssec_bogus: Logging a message for each DNSSEC validation failure.
dnstap: Logging DNS requests and responses to a unix socket.
- debugging: Advanced debugging parameters for kresd (Knot Resolver daemon).
"""
level: LogLevelEnum = "notice"
groups: Optional[List[LogGroupsEnum]] = None
dnssec_bogus: bool = False
dnstap: Union[Literal[False], DnstapSchema] = False
- debugging: DebuggingSchema = DebuggingSchema()
_LAYER = Raw
groups: Optional[List[LogGroupsEnum]]
dnssec_bogus: bool
dnstap: Union[Literal[False], DnstapSchema]
- debugging: DebuggingSchema
def _target(self, raw: Raw) -> LogTargetEnum:
if raw.target == "from-env":
}
})
{%- endif %}
-
--- logging.debugging.assertion-abort
-debugging.assertion_abort = {{ boolean(cfg.logging.debugging.assertion_abort) }}
-
--- logging.debugging.assertion-fork
-debugging.assertion_fork = {{ cfg.logging.debugging.assertion_fork.millis() }}