]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager: datamodel: watchdog section removed
authorAleš Mrázek <ales.mrazek@nic.cz>
Thu, 7 Jul 2022 06:48:40 +0000 (08:48 +0200)
committerAleš Mrázek <ales.mrazek@nic.cz>
Thu, 7 Jul 2022 06:48:40 +0000 (08:48 +0200)
manager/knot_resolver_manager/datamodel/config_schema.py
manager/knot_resolver_manager/datamodel/templates/config.lua.j2
manager/knot_resolver_manager/datamodel/templates/watchdog.lua.j2 [deleted file]
manager/knot_resolver_manager/datamodel/watchdog_schema.py [deleted file]

index 360a41568ca074aff1228d98dbf75cc055f930fe..86fab7a250ddc9adf9940d1699cf8966edbd243c 100644 (file)
@@ -25,7 +25,6 @@ from knot_resolver_manager.datamodel.static_hints_schema import StaticHintsSchem
 from knot_resolver_manager.datamodel.stub_zone_schema import StubZoneSchema
 from knot_resolver_manager.datamodel.types.types import IDPattern, IntPositive, UncheckedPath
 from knot_resolver_manager.datamodel.view_schema import ViewSchema
-from knot_resolver_manager.datamodel.watchdog_schema import WatchDogSchema
 from knot_resolver_manager.datamodel.webmgmt_schema import WebmgmtSchema
 from knot_resolver_manager.exceptions import DataException
 from knot_resolver_manager.utils import SchemaNode
@@ -92,7 +91,6 @@ class KresConfig(SchemaNode):
         rundir: Directory where the resolver can create files and which will be it's cwd.
         workers: The number of running kresd (Knot Resolver daemon) workers. If set to 'auto', it is equal to number of CPUs available.
         max_workers: The maximum number of workers allowed. Cannot be changed in runtime.
-        watchdog: Disable supervisord's watchdog, enable with defaults or set new configuration.
         management: Configuration of management HTTP API.
         webmgmt: Configuration of legacy web management endpoint.
         options: Fine-tuning global parameters of DNS resolver operation.
@@ -118,7 +116,6 @@ class KresConfig(SchemaNode):
         rundir: UncheckedPath = UncheckedPath(".")
         workers: Union[Literal["auto"], IntPositive] = IntPositive(1)
         max_workers: IntPositive = IntPositive(MAX_WORKERS)
-        watchdog: Union[bool, WatchDogSchema] = True
         management: ManagementSchema = ManagementSchema({"unix-socket": "./manager.sock"})
         webmgmt: Optional[WebmgmtSchema] = None
         options: OptionsSchema = OptionsSchema()
@@ -147,7 +144,6 @@ class KresConfig(SchemaNode):
     max_workers: IntPositive
     management: ManagementSchema
     webmgmt: Optional[WebmgmtSchema]
-    watchdog: Union[bool, WatchDogSchema]
     options: OptionsSchema
     network: NetworkSchema
     static_hints: StaticHintsSchema
index 53abea9b902136360b66186efe740d00aacc5382..93a58acea0be682cdf1a4eb5090581b8a58c0a6f 100644 (file)
@@ -12,9 +12,6 @@ nsid.name('{{ cfg.nsid }}_' .. worker.id)
 -- LOGGING section ----------------------------------
 {% include "logging.lua.j2" %}
 
--- WATCHDOG section -------------------------------
-{% include "watchdog.lua.j2" %}
-
 -- WEBMGMT section ----------------------------------
 {% include "webmgmt.lua.j2" %}
 
diff --git a/manager/knot_resolver_manager/datamodel/templates/watchdog.lua.j2 b/manager/knot_resolver_manager/datamodel/templates/watchdog.lua.j2
deleted file mode 100644 (file)
index 1288b3d..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-{% if cfg.watchdog -%}
--- watchdog
-modules.load('watchdog')
-{% if cfg.watchdog.qname and cfg.watchdog.qtype -%}
-watchdog.config({ qname = '{{ cfg.watchdog.qname.punycode() }}', qtype = kres.type.{{ cfg.watchdog.qtype }} })
-{%- endif %}
-{% else %}
-modules.unload('watchdog')
-{%- endif %}
\ No newline at end of file
diff --git a/manager/knot_resolver_manager/datamodel/watchdog_schema.py b/manager/knot_resolver_manager/datamodel/watchdog_schema.py
deleted file mode 100644 (file)
index 99d4a4e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-from knot_resolver_manager.datamodel.types import DNSRecordTypeEnum, DomainName
-from knot_resolver_manager.utils import SchemaNode
-
-
-class WatchDogSchema(SchemaNode):
-    """
-    Configuration of supervisord's watchdog which tests whether the started worker is working correctly.
-
-    ---
-    qname: Name to internaly query for.
-    qtype: DNS type to internaly query for.
-    """
-
-    qname: DomainName
-    qtype: DNSRecordTypeEnum