Skip to content

Commit

Permalink
fix(clustering): avoid 500 accessing v1 api when inc_sync enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
StarlightIbuki committed Oct 30, 2024
1 parent 0aaa4e0 commit 0c55600
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,12 @@ function Kong.init_worker()
return
end

if kong.configuration.role == "control_plane" then
if kong.clustering then
kong.clustering:init_worker()
end
end

kong.vault.init_worker()

kong.timing = kong_global.init_timing()
Expand Down
8 changes: 7 additions & 1 deletion spec/02-integration/09-hybrid_mode/01-sync_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ local KEY_AUTH_PLUGIN


--- XXX FIXME: enable inc_sync = on
for _, inc_sync in ipairs { "off" } do
for _, inc_sync in ipairs { "on", "off" } do
for _, strategy in helpers.each_strategy() do

describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, function()
Expand Down Expand Up @@ -624,6 +624,12 @@ describe("CP/DP #version check #" .. strategy, function()
end)
end)

-- skips the rest of the tests. We will fix them in a follow-up PR
if inc_sync == "on" then
pending("fix this!")
return
end

describe("CP/DP config sync #" .. strategy, function()
lazy_setup(function()
helpers.get_db_utils(strategy) -- runs migrations
Expand Down

0 comments on commit 0c55600

Please sign in to comment.