]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
datamodel: logging: removed debugging options
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 25 Mar 2025 12:25:38 +0000 (13:25 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Tue, 5 Aug 2025 09:09:03 +0000 (11:09 +0200)
NEWS
doc/_static/config.schema.json
doc/user/config-logging-debugging.rst [deleted file]
doc/user/config-logging-monitoring.rst
python/knot_resolver/datamodel/logging_schema.py
python/knot_resolver/datamodel/templates/logging.lua.j2

diff --git a/NEWS b/NEWS
index ae95ca41699e32831995057fda6efa6dd354f1fe..e76b20765dd1eabee7a80ef6c0701c64091cfbee 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,12 @@ Improvements
 ------------
 - 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)
 =================================
index 88e11901d818a2a2a999cb15a8cf32294196da20..4fc731f77c233029acdbc28b9a97d6c73bd73104 100644 (file)
                     ],
                     "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": {
diff --git a/doc/user/config-logging-debugging.rst b/doc/user/config-logging-debugging.rst
deleted file mode 100644 (file)
index 79dd54e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-.. 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
index a181f05ba38dc0ac5b30872d03f183cfd2064de0..dfe77101e32f9b1db1ac7363b0b4d2c05dfe13a8 100644 (file)
@@ -66,4 +66,3 @@ needs you can configure your own checks and exports using `asynchronous events <
    config-ta-signal-query
    config-time-skew-detection
    config-time-jump-detection
-   config-logging-debugging
index 6c398a8592d1960f6122090ac7ac30240bc28e7c..a504c3a834d4e9b5340166c93014c25f6e62b0ea 100644 (file)
@@ -1,7 +1,7 @@
 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
 
@@ -80,19 +80,6 @@ class DnstapSchema(ConfigSchema):
     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):
         """
@@ -104,7 +91,6 @@ class LoggingSchema(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"
@@ -112,7 +98,6 @@ class LoggingSchema(ConfigSchema):
         groups: Optional[List[LogGroupsEnum]] = None
         dnssec_bogus: bool = False
         dnstap: Union[Literal[False], DnstapSchema] = False
-        debugging: DebuggingSchema = DebuggingSchema()
 
     _LAYER = Raw
 
@@ -121,7 +106,6 @@ class LoggingSchema(ConfigSchema):
     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":
index 2d5937a832b7fe158a6ecefac45ffc2db402db2a..c031b47ccd387c3b0ac6cf7d458b2e3c40305759 100644 (file)
@@ -35,9 +35,3 @@ dnstap.config({
     }
 })
 {%- 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() }}