Skip to content

Commit 920ba98

Browse files
authored
fix(clustering): check for role->data_plane (#11814)
Signed-off-by: Joshua Schmid <[email protected]>
1 parent a3c249d commit 920ba98

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kong/clustering/utils.lua

+2-3
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,13 @@ function _M.connect_dp(dp_id, dp_hostname, dp_ip, dp_version)
155155
return wb, log_suffix
156156
end
157157

158-
159158
function _M.is_dp_worker_process()
160-
if kong.configuration.dedicated_config_processing == true then
159+
if kong.configuration.role == "data_plane"
160+
and kong.configuration.dedicated_config_processing == true then
161161
return process_type() == "privileged agent"
162162
end
163163

164164
return worker_id() == 0
165165
end
166166

167-
168167
return _M

0 commit comments

Comments
 (0)