Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release/3.5.x] fix(clustering): check for role->data_plane #11817

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions kong/clustering/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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