From 09496a7cd8e0ce77f34687849886b99c32118d38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20Mr=C3=A1zek?= Date: Mon, 3 Feb 2025 15:55:12 +0100 Subject: [PATCH] datamodel: policy-loader: added sleep after loading the config --- .../datamodel/templates/policy-config.lua.j2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/knot_resolver/datamodel/templates/policy-config.lua.j2 b/python/knot_resolver/datamodel/templates/policy-config.lua.j2 index 9d88537a9..3fbb7cc11 100644 --- a/python/knot_resolver/datamodel/templates/policy-config.lua.j2 +++ b/python/knot_resolver/datamodel/templates/policy-config.lua.j2 @@ -40,7 +40,13 @@ cache.open({{ cfg.cache.size_max.bytes() }}, 'lmdb://{{ cfg.cache.storage }}') {% set disable_defer = true %} {% include "defer.lua.j2" %} - {% 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. +worker.sleep(1) + +-- exit policy-loader properly quit() -- 2.47.2