]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
controller/supervisord: policy:loader: do not wait for the READY notification
authorAleš Mrázek <ales.mrazek@nic.cz>
Wed, 17 Sep 2025 09:16:40 +0000 (11:16 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Wed, 15 Oct 2025 14:18:09 +0000 (16:18 +0200)
policy-loader automatically enters RUNNING state when spawned

python/knot_resolver/controller/supervisord/config_file.py
python/knot_resolver/controller/supervisord/supervisord.conf.j2
python/knot_resolver/datamodel/templates/policy-config.lua.j2

index 05e380dcf6c5bf0407df60eafd9d2c20c54e8dd2..a825b62332cebd8945324e59e6dc2bd3afe9e721 100644 (file)
@@ -104,7 +104,7 @@ class ProcessTypeConfig:
             logfile=supervisord_subprocess_log_dir(config) / "policy-loader.log",
             workdir=cwd,
             command=f"{KRESD_EXECUTABLE} -c {(policy_loader_config_file(config))} -c - -n",
-            environment="X-SUPERVISORD-TYPE=notify",
+            environment="",
         )
 
     @staticmethod
index 4179d522114e3885946c6705155e501f0e1392f7..846f3110aad4631f516819b2e282b285b6fe5f30 100644 (file)
@@ -74,7 +74,8 @@ command={{ loader.command }}
 autostart=false
 stopsignal=TERM
 killasgroup=true
-startsecs=300
+startsecs=0
+exitcodes=0
 environment={{ loader.environment }}
 stdout_logfile=NONE
 stderr_logfile=NONE
index fbd824b38ec7012de19cc67b02566f0f57c13f86..0b99970339afd3dd7d810f31562dfd2c4ac1d748 100644 (file)
@@ -42,11 +42,5 @@ cache.open({{ cfg.cache.size_max.bytes() }}, 'lmdb://{{ cfg.cache.storage }}')
 
 {% endif %}
 
--- This sleep() is necessary because of the possible
--- termination of the policy-loader before it is
--- added into starting_processes in sd_notify.py.
--- If this happens, the READY notification will end with an error.
-C.sleep(1)
-
 -- exit policy-loader properly
 quit()