From 920ba98af1b30ec8bde0c62732bd6581c2f186a0 Mon Sep 17 00:00:00 2001 From: Joshua Schmid Date: Mon, 23 Oct 2023 13:46:05 +0100 Subject: [PATCH] fix(clustering): check for role->data_plane (#11814) Signed-off-by: Joshua Schmid --- kong/clustering/utils.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kong/clustering/utils.lua b/kong/clustering/utils.lua index 72e1cca30c5e..0ac9c8e69265 100644 --- a/kong/clustering/utils.lua +++ b/kong/clustering/utils.lua @@ -155,14 +155,13 @@ function _M.connect_dp(dp_id, dp_hostname, dp_ip, dp_version) return wb, log_suffix end - function _M.is_dp_worker_process() - if kong.configuration.dedicated_config_processing == true then + if kong.configuration.role == "data_plane" + and kong.configuration.dedicated_config_processing == true then return process_type() == "privileged agent" end return worker_id() == 0 end - return _M