diff --git a/kong/conf_loader/constants.lua b/kong/conf_loader/constants.lua index 95fff6f6867..2e3a27b31b5 100644 --- a/kong/conf_loader/constants.lua +++ b/kong/conf_loader/constants.lua @@ -513,7 +513,7 @@ local CONF_PARSERS = { cluster_use_proxy = { typ = "boolean" }, cluster_dp_labels = { typ = "array" }, cluster_rpc = { typ = "boolean" }, - cluster_incremental_sync = { typ = "boolean" }, + cluster_rpc_sync = { typ = "boolean" }, cluster_full_sync_threshold = { typ = "number" }, cluster_cjson = { typ = "boolean" }, diff --git a/kong/conf_loader/init.lua b/kong/conf_loader/init.lua index a2898a5e51f..3a32433b332 100644 --- a/kong/conf_loader/init.lua +++ b/kong/conf_loader/init.lua @@ -1034,10 +1034,10 @@ local function load(path, custom_conf, opts) end end - if conf.cluster_incremental_sync and not conf.cluster_rpc then - log.warn("Cluster incremental sync has been forcibly disabled, " .. + if conf.cluster_rpc_sync and not conf.cluster_rpc then + log.warn("Cluster rpc sync has been forcibly disabled, " .. "please enable cluster RPC.") - conf.cluster_incremental_sync = false + conf.cluster_rpc_sync = false end -- parse and validate pluginserver directives diff --git a/kong/global.lua b/kong/global.lua index 55ef7adfd99..a67e612ff0c 100644 --- a/kong/global.lua +++ b/kong/global.lua @@ -193,7 +193,7 @@ function _GLOBAL.init_worker_events(kong_config) local enable_privileged_agent = false if kong_config.dedicated_config_processing and kong_config.role == "data_plane" and - not kong.sync -- for incremental sync there is no privileged_agent + not kong.sync -- for rpc sync there is no privileged_agent then enable_privileged_agent = true end diff --git a/kong/init.lua b/kong/init.lua index a4f66a1450a..731540f8072 100644 --- a/kong/init.lua +++ b/kong/init.lua @@ -695,7 +695,7 @@ function Kong.init() if config.cluster_rpc then kong.rpc = require("kong.clustering.rpc.manager").new(config, kong.node.get_id()) - if config.cluster_incremental_sync then + if config.cluster_rpc_sync then kong.sync = require("kong.clustering.services.sync").new(db, is_control_plane(config)) kong.sync:init(kong.rpc) end @@ -885,8 +885,8 @@ function Kong.init_worker() local is_dp_sync_v1 = is_data_plane(kong.configuration) and not kong.sync local using_dedicated = kong.configuration.dedicated_config_processing - -- CP needs to support both full and incremental sync - -- full sync is only enabled for DP if incremental sync is disabled + -- CP needs to support both v1 and v2 sync + -- v1 sync is only enabled for DP if v2 sync is disabled if is_cp or is_dp_sync_v1 then kong.clustering:init_worker() end @@ -992,7 +992,7 @@ function Kong.init_worker() plugin_servers.start() end - -- rpc and incremental sync + -- rpc and sync if is_http_module then -- init rpc connection @@ -1000,7 +1000,7 @@ function Kong.init_worker() kong.rpc:init_worker() end - -- init incremental sync + -- init sync -- should run after rpc init successfully if kong.sync then kong.sync:init_worker() diff --git a/kong/pdk/vault.lua b/kong/pdk/vault.lua index b7a1adff184..05921a3b9c5 100644 --- a/kong/pdk/vault.lua +++ b/kong/pdk/vault.lua @@ -1444,7 +1444,7 @@ local function new(self) local not_dbless = conf.database ~= "off" -- postgres local dp_with_inc_sync = conf.role == "data_plane" and - conf.cluster_incremental_sync + conf.cluster_rpc_sync return not_dbless or dp_with_inc_sync end diff --git a/kong/runloop/handler.lua b/kong/runloop/handler.lua index 37efc7f8bb7..54eb8cf0ba3 100644 --- a/kong/runloop/handler.lua +++ b/kong/runloop/handler.lua @@ -363,10 +363,10 @@ local function new_router(version) -- like rebuild_router_timer. And it relies on core_cache to detect changes. -- -- 1. stratey off (dbless) - -- incremental_sync on: + -- rpc_sync on: -- non init worker: true(kong.core_cache) -- init worker: false - -- incremental_sync off: false + -- rpc_sync off: false -- 2. strategy on (non dbless): true(kong.core_cache) local detect_changes = kong.core_cache and (db.strategy ~= "off" or (kong.sync and get_phase() ~= "init_worker")) @@ -986,7 +986,7 @@ return { -- start some rebuild timers for -- 1. traditional mode - -- 2. DP with incremental sync on (dbless mode) + -- 2. DP with rpc sync on (dbless mode) if strategy ~= "off" or kong.sync then local worker_state_update_frequency = kong.configuration.worker_state_update_frequency or 1 diff --git a/kong/templates/kong_defaults.lua b/kong/templates/kong_defaults.lua index 93962641740..83ef5f95eb3 100644 --- a/kong/templates/kong_defaults.lua +++ b/kong/templates/kong_defaults.lua @@ -42,7 +42,7 @@ cluster_max_payload = 16777216 cluster_use_proxy = off cluster_dp_labels = NONE cluster_rpc = off -cluster_incremental_sync = off +cluster_rpc_sync = off cluster_full_sync_threshold = 512 cluster_cjson = off diff --git a/spec/01-unit/01-db/10-declarative_spec.lua b/spec/01-unit/01-db/10-declarative_spec.lua index be683a2df37..137bebb206e 100644 --- a/spec/01-unit/01-db/10-declarative_spec.lua +++ b/spec/01-unit/01-db/10-declarative_spec.lua @@ -56,7 +56,7 @@ keyauth_credentials: assert.equals("services|123|fieldname|" .. sha256_hex("test"), key) end) - -- since incremental sync the param `unique_across_ws` is useless + -- since rpc sync the param `unique_across_ws` is useless -- this test case is just for compatibility it("does not omits the workspace id when 'unique_across_ws' is 'true'", function() local key = unique_field_key("services", "123", "fieldname", "test", true) diff --git a/spec/01-unit/01-db/11-declarative_lmdb_spec.lua b/spec/01-unit/01-db/11-declarative_lmdb_spec.lua index 6fbe9181c96..047fadae604 100644 --- a/spec/01-unit/01-db/11-declarative_lmdb_spec.lua +++ b/spec/01-unit/01-db/11-declarative_lmdb_spec.lua @@ -202,7 +202,7 @@ describe("#off preserve nulls", function() local id, item = next(entities.basicauth_credentials) - -- format changed after incremental sync + -- format changed after rpc sync local cache_key = concat({ "basicauth_credentials|", item.ws_id, @@ -225,7 +225,7 @@ describe("#off preserve nulls", function() for _, plugin in pairs(entities.plugins) do if plugin.name == PLUGIN_NAME then - -- format changed after incremental sync + -- format changed after rpc sync cache_key = concat({ "plugins|", plugin.ws_id, diff --git a/spec/02-integration/07-sdk/03-cluster_spec.lua b/spec/02-integration/07-sdk/03-cluster_spec.lua index fadc4d4093d..2aea775edc0 100644 --- a/spec/02-integration/07-sdk/03-cluster_spec.lua +++ b/spec/02-integration/07-sdk/03-cluster_spec.lua @@ -41,10 +41,10 @@ fixtures_cp.http_mock.my_server_block = [[ ]] for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do - describe("PDK: kong.cluster for #" .. strategy .. " inc_sync=" .. inc_sync, function() + describe("PDK: kong.cluster for #" .. strategy .. " rpc_sync=" .. rpc_sync, function() local proxy_client lazy_setup(function() @@ -65,7 +65,7 @@ for _, strategy in helpers.each_strategy() do cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }, nil, nil, fixtures_cp)) assert(helpers.start_kong({ @@ -78,7 +78,7 @@ for _, strategy in helpers.each_strategy() do proxy_listen = "0.0.0.0:9002", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }, nil, nil, fixtures_dp)) end) @@ -116,4 +116,4 @@ for _, strategy in helpers.each_strategy() do end) end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/01-sync_spec.lua b/spec/02-integration/09-hybrid_mode/01-sync_spec.lua index 5f96f273850..bb941bd4ed3 100644 --- a/spec/02-integration/09-hybrid_mode/01-sync_spec.lua +++ b/spec/02-integration/09-hybrid_mode/01-sync_spec.lua @@ -13,11 +13,11 @@ local KEY_AUTH_PLUGIN for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do -describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, function() +describe("CP/DP communication #" .. strategy .. " rpc_sync=" .. rpc_sync, function() lazy_setup(function() helpers.get_db_utils(strategy) -- runs migrations @@ -31,7 +31,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -44,7 +44,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi proxy_listen = "0.0.0.0:9002", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, worker_state_update_frequency = 1, })) @@ -348,7 +348,7 @@ describe("CP/DP communication #" .. strategy .. " inc_sync=" .. inc_sync, functi end) end) -describe("CP/DP #version check #" .. strategy .. " inc_sync=" .. inc_sync, function() +describe("CP/DP #version check #" .. strategy .. " rpc_sync=" .. rpc_sync, function() -- for these tests, we do not need a real DP, but rather use the fake DP -- client so we can mock various values (e.g. node_version) describe("relaxed compatibility check:", function() @@ -368,7 +368,7 @@ describe("CP/DP #version check #" .. strategy .. " inc_sync=" .. inc_sync, funct nginx_conf = "spec/fixtures/custom_nginx.template", cluster_version_check = "major_minor", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) for _, plugin in ipairs(helpers.get_plugins_list()) do @@ -625,7 +625,7 @@ describe("CP/DP #version check #" .. strategy .. " inc_sync=" .. inc_sync, funct end) end) -describe("CP/DP config sync #" .. strategy .. " inc_sync=" .. inc_sync, function() +describe("CP/DP config sync #" .. strategy .. " rpc_sync=" .. rpc_sync, function() lazy_setup(function() helpers.get_db_utils(strategy) -- runs migrations @@ -637,7 +637,7 @@ describe("CP/DP config sync #" .. strategy .. " inc_sync=" .. inc_sync, function db_update_frequency = 3, cluster_listen = "127.0.0.1:9005", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -648,7 +648,7 @@ describe("CP/DP config sync #" .. strategy .. " inc_sync=" .. inc_sync, function cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_control_plane = "127.0.0.1:9005", proxy_listen = "0.0.0.0:9002", - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, cluster_rpc = rpc, worker_state_update_frequency = 1, })) @@ -754,7 +754,7 @@ describe("CP/DP labels #" .. strategy, function() cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -768,7 +768,7 @@ describe("CP/DP labels #" .. strategy, function() nginx_conf = "spec/fixtures/custom_nginx.template", cluster_dp_labels="deployment:mycloud,region:us-east-1", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -796,8 +796,8 @@ describe("CP/DP labels #" .. strategy, function() assert.equal(CLUSTERING_SYNC_STATUS.NORMAL, v.sync_status) assert.equal(CLUSTERING_SYNC_STATUS.NORMAL, v.sync_status) -- TODO: The API output does include labels and certs when the - -- incremental sync is enabled. - if inc_sync == "off" then + -- rpc sync is enabled. + if rpc_sync == "off" then assert.equal("mycloud", v.labels.deployment) assert.equal("us-east-1", v.labels.region) end @@ -822,7 +822,7 @@ describe("CP/DP cert details(cluster_mtls = shared) #" .. strategy, function() cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -836,7 +836,7 @@ describe("CP/DP cert details(cluster_mtls = shared) #" .. strategy, function() nginx_conf = "spec/fixtures/custom_nginx.template", cluster_dp_labels="deployment:mycloud,region:us-east-1", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -860,8 +860,8 @@ describe("CP/DP cert details(cluster_mtls = shared) #" .. strategy, function() for _, v in pairs(json.data) do if v.ip == "127.0.0.1" then -- TODO: The API output does include labels and certs when the - -- incremental sync is enabled. - if inc_sync == "off" then + -- rpc sync is enabled. + if rpc_sync == "off" then assert.equal(1888983905, v.cert_details.expiry_timestamp) end return true @@ -888,7 +888,7 @@ describe("CP/DP cert details(cluster_mtls = pki) #" .. strategy, function() cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/kong_clustering_ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -905,7 +905,7 @@ describe("CP/DP cert details(cluster_mtls = pki) #" .. strategy, function() cluster_server_name = "kong_clustering", cluster_ca_cert = "spec/fixtures/kong_clustering.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -929,8 +929,8 @@ describe("CP/DP cert details(cluster_mtls = pki) #" .. strategy, function() for _, v in pairs(json.data) do if v.ip == "127.0.0.1" then -- TODO: The API output does include labels and certs when the - -- incremental sync is enabled. - if inc_sync == "off" then + -- rpc sync is enabled. + if rpc_sync == "off" then assert.equal(1897136778, v.cert_details.expiry_timestamp) end return true @@ -942,4 +942,4 @@ describe("CP/DP cert details(cluster_mtls = pki) #" .. strategy, function() end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua b/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua index c236b1ec1c8..9b4c4222139 100644 --- a/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua +++ b/spec/02-integration/09-hybrid_mode/02-start_stop_spec.lua @@ -2,9 +2,9 @@ local helpers = require "spec.helpers" for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] -describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() +describe("invalid config are rejected" .. " rpc_sync=" .. rpc_sync, function() describe("role is control_plane", function() it("can not disable admin_listen", function() local ok, err = helpers.start_kong({ @@ -15,7 +15,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", admin_listen = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -31,7 +31,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_listen = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -47,7 +47,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", database = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -63,7 +63,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_mtls = "pki", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -81,7 +81,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", proxy_listen = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -96,7 +96,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -114,7 +114,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_dp_labels = "w@:_a", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -132,7 +132,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() proxy_listen = "0.0.0.0:" .. helpers.get_available_port(), cluster_dp_labels = "Aa-._zZ_key:Aa-._zZ_val", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.True(ok) helpers.stop_kong("servroot2") @@ -148,7 +148,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() database = param[2], prefix = "servroot2", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -163,7 +163,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() prefix = "servroot2", cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) assert.False(ok) @@ -174,7 +174,7 @@ describe("invalid config are rejected" .. " inc_sync=" .. inc_sync, function() end) -- note that lagacy modes still error when CP exits -describe("when CP exits before DP" .. " inc_sync=" .. inc_sync, function() +describe("when CP exits before DP" .. " rpc_sync=" .. rpc_sync, function() local need_exit = true lazy_setup(function() @@ -188,7 +188,7 @@ describe("when CP exits before DP" .. " inc_sync=" .. inc_sync, function() cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_listen = "127.0.0.1:9005", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ role = "data_plane", @@ -199,7 +199,7 @@ describe("when CP exits before DP" .. " inc_sync=" .. inc_sync, function() proxy_listen = "0.0.0.0:9002", database = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, -- EE [[ -- vitals uses the clustering strategy by default, and it logs the exact -- same "error while receiving frame from peer" error strings that this @@ -223,4 +223,4 @@ describe("when CP exits before DP" .. " inc_sync=" .. inc_sync, function() assert.logfile("servroot2/logs/error.log").has.no.line("error while receiving frame from peer", true) end) end) -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/03-pki_spec.lua b/spec/02-integration/09-hybrid_mode/03-pki_spec.lua index adb53b801c3..90c182e6d14 100644 --- a/spec/02-integration/09-hybrid_mode/03-pki_spec.lua +++ b/spec/02-integration/09-hybrid_mode/03-pki_spec.lua @@ -3,11 +3,11 @@ local cjson = require "cjson.safe" for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do -describe("CP/DP PKI sync #" .. strategy .. " inc_sync=" .. inc_sync, function() +describe("CP/DP PKI sync #" .. strategy .. " rpc_sync=" .. rpc_sync, function() lazy_setup(function() helpers.get_db_utils(strategy, { @@ -29,7 +29,7 @@ describe("CP/DP PKI sync #" .. strategy .. " inc_sync=" .. inc_sync, function() cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/kong_clustering_ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -46,7 +46,7 @@ describe("CP/DP PKI sync #" .. strategy .. " inc_sync=" .. inc_sync, function() cluster_server_name = "kong_clustering", cluster_ca_cert = "spec/fixtures/kong_clustering.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, worker_state_update_frequency = 1, })) end) @@ -167,4 +167,4 @@ describe("CP/DP PKI sync #" .. strategy .. " inc_sync=" .. inc_sync, function() end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/04-cp_cluster_sync_spec.lua b/spec/02-integration/09-hybrid_mode/04-cp_cluster_sync_spec.lua index 17d836fc979..5a47069db05 100644 --- a/spec/02-integration/09-hybrid_mode/04-cp_cluster_sync_spec.lua +++ b/spec/02-integration/09-hybrid_mode/04-cp_cluster_sync_spec.lua @@ -21,10 +21,10 @@ end for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do - describe("CP/CP sync works with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function() + describe("CP/CP sync works with #" .. strategy .. " rpc_sync=" .. rpc_sync .. " backend", function() lazy_setup(function() helpers.get_db_utils(strategy, { "routes", "services" }) @@ -39,7 +39,7 @@ for _, strategy in helpers.each_strategy() do cluster_cert_key = "spec/fixtures/kong_clustering.key", database = strategy, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -53,7 +53,7 @@ for _, strategy in helpers.each_strategy() do cluster_cert_key = "spec/fixtures/kong_clustering.key", database = strategy, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -86,4 +86,4 @@ for _, strategy in helpers.each_strategy() do end) end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/05-ocsp_spec.lua b/spec/02-integration/09-hybrid_mode/05-ocsp_spec.lua index ee6b50d3b34..26824085c67 100644 --- a/spec/02-integration/09-hybrid_mode/05-ocsp_spec.lua +++ b/spec/02-integration/09-hybrid_mode/05-ocsp_spec.lua @@ -15,11 +15,11 @@ end for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do -describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, function() +describe("cluster_ocsp = on works #" .. strategy .. " rpc_sync=" .. rpc_sync, function() describe("DP certificate good", function() lazy_setup(function() helpers.get_db_utils(strategy, { @@ -44,7 +44,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("good") @@ -63,7 +63,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_server_name = "kong_clustering", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -118,7 +118,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("revoked") @@ -137,7 +137,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -190,7 +190,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("error") @@ -209,7 +209,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -240,7 +240,7 @@ describe("cluster_ocsp = on works #" .. strategy .. " inc_sync=" .. inc_sync, fu end) end) -describe("cluster_ocsp = off works with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function() +describe("cluster_ocsp = off works with #" .. strategy .. " rpc_sync=" .. rpc_sync .. " backend", function() describe("DP certificate revoked, not checking for OCSP", function() lazy_setup(function() helpers.get_db_utils(strategy, { @@ -265,7 +265,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " inc_sync=" .. inc_sy cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("revoked") @@ -284,7 +284,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " inc_sync=" .. inc_sy cluster_server_name = "kong_clustering", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -316,7 +316,7 @@ describe("cluster_ocsp = off works with #" .. strategy .. " inc_sync=" .. inc_sy end) end) -describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function() +describe("cluster_ocsp = optional works with #" .. strategy .. " rpc_sync=" .. rpc_sync .. " backend", function() describe("DP certificate revoked", function() lazy_setup(function() helpers.get_db_utils(strategy, { @@ -341,7 +341,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. i cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("revoked") @@ -360,7 +360,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. i cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -413,7 +413,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. i cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) set_ocsp_status("error") @@ -432,7 +432,7 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. i cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -468,4 +468,4 @@ describe("cluster_ocsp = optional works with #" .. strategy .. " inc_sync=" .. i end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/08-lazy_export_spec.lua b/spec/02-integration/09-hybrid_mode/08-lazy_export_spec.lua index bbeb3524842..bc235385c6b 100644 --- a/spec/02-integration/09-hybrid_mode/08-lazy_export_spec.lua +++ b/spec/02-integration/09-hybrid_mode/08-lazy_export_spec.lua @@ -2,7 +2,7 @@ local helpers = require "spec.helpers" local admin_client -local function cp(strategy, rpc, inc_sync) +local function cp(strategy, rpc, rpc_sync) helpers.get_db_utils(strategy) -- make sure the DB is fresh n' clean assert(helpers.start_kong({ role = "control_plane", @@ -15,7 +15,7 @@ local function cp(strategy, rpc, inc_sync) cluster_mtls = "pki", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) admin_client = assert(helpers.admin_client()) end @@ -36,7 +36,7 @@ local function touch_config() })) end -local function json_dp(rpc, inc_sync) +local function json_dp(rpc, rpc_sync) assert(helpers.start_kong({ role = "data_plane", database = "off", @@ -50,27 +50,27 @@ local function json_dp(rpc, inc_sync) cluster_server_name = "kong_clustering", cluster_ca_cert = "spec/fixtures/ocsp_certs/ca.crt", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do -describe("lazy_export with #".. strategy .. " inc_sync=" .. inc_sync, function() +describe("lazy_export with #".. strategy .. " rpc_sync=" .. rpc_sync, function() describe("no DP", function () setup(function() - cp(strategy, rpc, inc_sync) + cp(strategy, rpc, rpc_sync) end) teardown(function () helpers.stop_kong() end) it("test", function () touch_config() - if inc_sync == "on" then + if rpc_sync == "on" then assert.logfile().has.no.line("[kong.sync.v2] config push (connected client)", true) else @@ -81,8 +81,8 @@ describe("lazy_export with #".. strategy .. " inc_sync=" .. inc_sync, function() describe("only json DP", function() setup(function() - cp(strategy, rpc, inc_sync) - json_dp(rpc, inc_sync) + cp(strategy, rpc, rpc_sync) + json_dp(rpc, rpc_sync) end) teardown(function () helpers.stop_kong("dp1") @@ -91,7 +91,7 @@ describe("lazy_export with #".. strategy .. " inc_sync=" .. inc_sync, function() it("test", function () touch_config() - if inc_sync == "on" then + if rpc_sync == "on" then assert.logfile().has.line("[kong.sync.v2] config push (connected client)", true) assert.logfile().has.line("[kong.sync.v2] database is empty or too far behind for node_id", true) @@ -105,4 +105,4 @@ describe("lazy_export with #".. strategy .. " inc_sync=" .. inc_sync, function() end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua b/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua index 8c2b26fba41..79a73e5ec50 100644 --- a/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua +++ b/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua @@ -76,8 +76,8 @@ local function get_sync_status(id) end --- XXX TODO: helpers.clustering_client supports incremental sync -for _, inc_sync in ipairs { "off" } do +-- XXX TODO: helpers.clustering_client supports rpc sync +for _, rpc_sync in ipairs { "off" } do for _, strategy in helpers.each_strategy() do describe("CP/DP config compat transformations #" .. strategy, function() @@ -103,7 +103,7 @@ describe("CP/DP config compat transformations #" .. strategy, function() cluster_listen = CP_HOST .. ":" .. CP_PORT, nginx_conf = "spec/fixtures/custom_nginx.template", plugins = "bundled", - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -1201,4 +1201,4 @@ describe("CP/DP config compat transformations #" .. strategy, function() end) end -- each strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/09-node-id-persistence_spec.lua b/spec/02-integration/09-hybrid_mode/09-node-id-persistence_spec.lua index 28fa82074e0..7b358f62920 100644 --- a/spec/02-integration/09-hybrid_mode/09-node-id-persistence_spec.lua +++ b/spec/02-integration/09-hybrid_mode/09-node-id-persistence_spec.lua @@ -84,10 +84,10 @@ end for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do - describe("node id persistence " .. " inc_sync=" .. inc_sync, function() + describe("node id persistence " .. " rpc_sync=" .. rpc_sync, function() local control_plane_config = { role = "control_plane", @@ -97,7 +97,7 @@ for _, strategy in helpers.each_strategy() do cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, } local data_plane_config = { @@ -113,7 +113,7 @@ for _, strategy in helpers.each_strategy() do untrusted_lua = "on", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, worker_state_update_frequency = 1, } @@ -331,4 +331,4 @@ for _, strategy in helpers.each_strategy() do end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/10-forward-proxy_spec.lua b/spec/02-integration/09-hybrid_mode/10-forward-proxy_spec.lua index 27856b4554e..80f30902aa5 100644 --- a/spec/02-integration/09-hybrid_mode/10-forward-proxy_spec.lua +++ b/spec/02-integration/09-hybrid_mode/10-forward-proxy_spec.lua @@ -72,11 +72,11 @@ local proxy_configs = { -- test run too fast before the proxy connection is established for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do for proxy_desc, proxy_opts in pairs(proxy_configs) do describe("CP/DP sync through proxy (" .. proxy_desc .. ") works with #" - .. strategy .. " rpc=" .. rpc .. " inc_sync=" .. inc_sync + .. strategy .. " rpc=" .. rpc .. " rpc_sync=" .. rpc_sync .. " backend", function() lazy_setup(function() helpers.get_db_utils(strategy) -- runs migrations @@ -90,7 +90,7 @@ for _, strategy in helpers.each_strategy() do cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -112,7 +112,7 @@ for _, strategy in helpers.each_strategy() do lua_ssl_trusted_certificate = proxy_opts.lua_ssl_trusted_certificate, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, -- this is unused, but required for the template to include a stream {} block stream_listen = "0.0.0.0:5555", @@ -172,7 +172,7 @@ for _, strategy in helpers.each_strategy() do end -- check the debug log of the `cluster_use_proxy` option - local line = inc_sync == "on" and "[rpc] using proxy" or + local line = rpc_sync == "on" and "[rpc] using proxy" or "[clustering] using proxy" assert.logfile("servroot2/logs/error.log").has.line(line, true) end) @@ -181,4 +181,4 @@ for _, strategy in helpers.each_strategy() do end -- proxy configs end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/11-status_spec.lua b/spec/02-integration/09-hybrid_mode/11-status_spec.lua index c6ada743ee1..86cd8941819 100644 --- a/spec/02-integration/09-hybrid_mode/11-status_spec.lua +++ b/spec/02-integration/09-hybrid_mode/11-status_spec.lua @@ -5,11 +5,11 @@ local cp_status_port = helpers.get_available_port() local dp_status_port = 8100 for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy() do - describe("Hybrid Mode - status ready #" .. strategy .. " inc_sync=" .. inc_sync, function() + describe("Hybrid Mode - status ready #" .. strategy .. " rpc_sync=" .. rpc_sync, function() helpers.get_db_utils(strategy, {}) @@ -25,7 +25,7 @@ for _, strategy in helpers.each_strategy() do nginx_main_worker_processes = 8, status_listen = "127.0.0.1:" .. dp_status_port, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) end @@ -40,7 +40,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", status_listen = "127.0.0.1:" .. cp_status_port, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }) end @@ -75,7 +75,7 @@ for _, strategy in helpers.each_strategy() do describe("dp status ready endpoint for no config", function() -- XXX FIXME - local skip_inc_sync = inc_sync == "on" and pending or it + local skip_rpc_sync = rpc_sync == "on" and pending or it lazy_setup(function() assert(start_kong_cp()) @@ -108,7 +108,7 @@ for _, strategy in helpers.each_strategy() do -- now dp receive config from cp, so dp should be ready - skip_inc_sync("should return 200 on data plane after configuring", function() + skip_rpc_sync("should return 200 on data plane after configuring", function() helpers.wait_until(function() local http_client = helpers.http_client('127.0.0.1', dp_status_port) @@ -166,4 +166,4 @@ for _, strategy in helpers.each_strategy() do end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/12-errors_spec.lua b/spec/02-integration/09-hybrid_mode/12-errors_spec.lua index fbbc3049cd5..52b3147a6ae 100644 --- a/spec/02-integration/09-hybrid_mode/12-errors_spec.lua +++ b/spec/02-integration/09-hybrid_mode/12-errors_spec.lua @@ -69,10 +69,10 @@ local function get_error_report(client, msg) end --- XXX TODO: mock_cp does not support incremental sync rpc -for _, inc_sync in ipairs { "off" } do +-- XXX TODO: mock_cp does not support rpc sync rpc +for _, rpc_sync in ipairs { "off" } do for _, strategy in helpers.each_strategy() do - describe("CP/DP sync error-reporting with #" .. strategy .. " inc_sync=" .. inc_sync .. " backend", function() + describe("CP/DP sync error-reporting with #" .. strategy .. " rpc_sync=" .. rpc_sync .. " backend", function() local client local cluster_port local cluster_ssl_port @@ -102,7 +102,7 @@ for _, strategy in helpers.each_strategy() do -- use a small map size so that it's easy for us to max it out lmdb_map_size = "1m", plugins = "bundled,cluster-error-reporting", - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, }, nil, nil, fixtures)) end) @@ -260,4 +260,4 @@ for _, strategy in helpers.each_strategy() do end) end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/13-deprecations_spec.lua b/spec/02-integration/09-hybrid_mode/13-deprecations_spec.lua index fcb8bf6bbca..a1d824cf72b 100644 --- a/spec/02-integration/09-hybrid_mode/13-deprecations_spec.lua +++ b/spec/02-integration/09-hybrid_mode/13-deprecations_spec.lua @@ -4,10 +4,10 @@ local join = require("pl.stringx").join local ENABLED_PLUGINS = { "dummy" , "reconfiguration-completion"} for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy({"postgres"}) do - describe("deprecations are not reported on DP but on CP " .. " inc_sync=" .. inc_sync, function() + describe("deprecations are not reported on DP but on CP " .. " rpc_sync=" .. rpc_sync, function() local cp_prefix = "servroot1" local dp_prefix = "servroot2" local cp_logfile, dp_logfile, route @@ -45,7 +45,7 @@ for _, strategy in helpers.each_strategy({"postgres"}) do admin_listen = "0.0.0.0:9001", proxy_listen = "off", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -61,7 +61,7 @@ for _, strategy in helpers.each_strategy({"postgres"}) do admin_listen = "off", proxy_listen = "0.0.0.0:9002", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) dp_logfile = helpers.get_running_conf(dp_prefix).nginx_err_logs cp_logfile = helpers.get_running_conf(cp_prefix).nginx_err_logs @@ -119,4 +119,4 @@ for _, strategy in helpers.each_strategy({"postgres"}) do end) end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/09-hybrid_mode/14-dp_privileged_agent_spec.lua b/spec/02-integration/09-hybrid_mode/14-dp_privileged_agent_spec.lua index 1c5e351bf87..d78ec1469e2 100644 --- a/spec/02-integration/09-hybrid_mode/14-dp_privileged_agent_spec.lua +++ b/spec/02-integration/09-hybrid_mode/14-dp_privileged_agent_spec.lua @@ -5,7 +5,7 @@ local CLUSTERING_SYNC_STATUS = require("kong.constants").CLUSTERING_SYNC_STATUS for _, dedicated in ipairs { "on", "off" } do for _, strategy in helpers.each_strategy() do -describe("DP diabled Incremental Sync RPC #" .. strategy, function() +describe("DP diabled Sync RPC #" .. strategy, function() lazy_setup(function() helpers.get_db_utils(strategy, { @@ -21,7 +21,7 @@ describe("DP diabled Incremental Sync RPC #" .. strategy, function() nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", - cluster_incremental_sync = "on", -- ENABLE incremental sync + cluster_rpc_sync = "on", -- ENABLE rpc sync })) assert(helpers.start_kong({ @@ -36,7 +36,7 @@ describe("DP diabled Incremental Sync RPC #" .. strategy, function() nginx_worker_processes = 2, -- multiple workers cluster_rpc = "off", -- DISABLE rpc - cluster_incremental_sync = "off", -- DISABLE incremental sync + cluster_rpc_sync = "off", -- DISABLE rpc sync dedicated_config_processing = dedicated, -- privileged agent })) diff --git a/spec/02-integration/18-hybrid_rpc/01-rpc_spec.lua b/spec/02-integration/18-hybrid_rpc/01-rpc_spec.lua index 8f670a0388e..218b28b6250 100644 --- a/spec/02-integration/18-hybrid_rpc/01-rpc_spec.lua +++ b/spec/02-integration/18-hybrid_rpc/01-rpc_spec.lua @@ -20,7 +20,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", plugins = "bundled,rpc-hello-test", - cluster_incremental_sync = "off", + cluster_rpc_sync = "off", })) assert(helpers.start_kong({ @@ -34,7 +34,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", plugins = "bundled,rpc-hello-test", - cluster_incremental_sync = "off", + cluster_rpc_sync = "off", })) end) diff --git a/spec/02-integration/18-hybrid_rpc/04-concentrator_spec.lua b/spec/02-integration/18-hybrid_rpc/04-concentrator_spec.lua index 445bcee6ec1..9986d5f4e79 100644 --- a/spec/02-integration/18-hybrid_rpc/04-concentrator_spec.lua +++ b/spec/02-integration/18-hybrid_rpc/04-concentrator_spec.lua @@ -47,7 +47,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", plugins = "bundled,rpc-hello-test", - cluster_incremental_sync = "off", + cluster_rpc_sync = "off", })) assert(helpers.start_kong({ @@ -60,7 +60,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", plugins = "bundled,rpc-hello-test", - cluster_incremental_sync = "off", + cluster_rpc_sync = "off", })) assert(helpers.start_kong({ @@ -74,7 +74,7 @@ for _, strategy in helpers.each_strategy() do nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", plugins = "bundled,rpc-hello-test", - cluster_incremental_sync = "off", + cluster_rpc_sync = "off", })) end) diff --git a/spec/02-integration/19-incrmental_sync/01-sync_spec.lua b/spec/02-integration/19-incrmental_sync/01-sync_spec.lua index abb969d2a0f..a608e6432ed 100644 --- a/spec/02-integration/19-incrmental_sync/01-sync_spec.lua +++ b/spec/02-integration/19-incrmental_sync/01-sync_spec.lua @@ -36,7 +36,7 @@ describe("Incremental Sync RPC #" .. strategy, function() cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", - cluster_incremental_sync = "on", -- incremental sync + cluster_rpc_sync = "on", -- rpc sync })) assert(helpers.start_kong({ @@ -50,7 +50,7 @@ describe("Incremental Sync RPC #" .. strategy, function() nginx_conf = "spec/fixtures/custom_nginx.template", nginx_worker_processes = 4, -- multiple workers cluster_rpc = "on", - cluster_incremental_sync = "on", -- incremental sync + cluster_rpc_sync = "on", -- rpc sync worker_state_update_frequency = 1, })) end) diff --git a/spec/02-integration/19-incrmental_sync/02-multiple_dp_nodes_spec.lua b/spec/02-integration/19-incrmental_sync/02-multiple_dp_nodes_spec.lua index 8567c03fba2..fe7f89432a5 100644 --- a/spec/02-integration/19-incrmental_sync/02-multiple_dp_nodes_spec.lua +++ b/spec/02-integration/19-incrmental_sync/02-multiple_dp_nodes_spec.lua @@ -10,7 +10,7 @@ local function start_cp(strategy, port) cluster_listen = "127.0.0.1:" .. port, nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = "on", - cluster_incremental_sync = "on", -- incremental sync + cluster_rpc_sync = "on", -- rpc sync })) end @@ -26,7 +26,7 @@ local function start_dp(prefix, port) nginx_conf = "spec/fixtures/custom_nginx.template", nginx_worker_processes = 4, -- multiple workers cluster_rpc = "on", - cluster_incremental_sync = "on", -- incremental sync + cluster_rpc_sync = "on", -- rpc sync worker_state_update_frequency = 1, })) end diff --git a/spec/02-integration/20-wasm/06-clustering_spec.lua b/spec/02-integration/20-wasm/06-clustering_spec.lua index 4d5a63e323d..540331bcc67 100644 --- a/spec/02-integration/20-wasm/06-clustering_spec.lua +++ b/spec/02-integration/20-wasm/06-clustering_spec.lua @@ -72,9 +72,9 @@ local function new_wasm_filter_directory() end --- XXX TODO: enable inc_sync = "on" -for _, inc_sync in ipairs { "off" } do -describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() +-- XXX TODO: enable rpc_sync = "on" +for _, rpc_sync in ipairs { "off" } do +describe("#wasm - hybrid mode #postgres" .. " rpc_sync=" .. rpc_sync, function() local cp_prefix = "cp" local cp_errlog = cp_prefix .. "/logs/error.log" local cp_filter_path @@ -115,7 +115,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() wasm_filters = "user", -- don't enable bundled filters for this test wasm_filters_path = cp_filter_path, nginx_main_worker_processes = 2, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert.logfile(cp_errlog).has.line([[successfully loaded "response_transformer" module]], true, 10) @@ -155,7 +155,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() wasm_filters_path = dp_filter_path, node_id = node_id, nginx_main_worker_processes = 2, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert.logfile(dp_errlog).has.line([[successfully loaded "response_transformer" module]], true, 10) @@ -311,7 +311,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() nginx_conf = "spec/fixtures/custom_nginx.template", wasm = "off", node_id = node_id, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -351,7 +351,7 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() wasm_filters = "user", -- don't enable bundled filters for this test wasm_filters_path = tmp_dir, node_id = node_id, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -370,4 +370,4 @@ describe("#wasm - hybrid mode #postgres" .. " inc_sync=" .. inc_sync, function() end) end) end) -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/02-integration/20-wasm/10-wasmtime_spec.lua b/spec/02-integration/20-wasm/10-wasmtime_spec.lua index 60a5bed93d8..44f595c7c6d 100644 --- a/spec/02-integration/20-wasm/10-wasmtime_spec.lua +++ b/spec/02-integration/20-wasm/10-wasmtime_spec.lua @@ -2,7 +2,7 @@ local helpers = require "spec.helpers" local fmt = string.format for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, role in ipairs({"traditional", "control_plane", "data_plane"}) do @@ -22,11 +22,11 @@ describe("#wasm wasmtime (role: " .. role .. ") (#postgres, #db)", function() cluster_cert = "spec/fixtures/kong_clustering.crt", cluster_cert_key = "spec/fixtures/kong_clustering.key", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) conf = assert(helpers.get_running_conf(prefix)) - conf.cluster_incremental_sync = inc_sync == "on" + conf.cluster_rpc_sync = rpc_sync == "on" end) lazy_teardown(function() @@ -98,11 +98,11 @@ describe("#wasm wasmtime (role: " .. role .. ") (#postgres, #db)", function() nginx_main_worker_processes = 2, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) conf = assert(helpers.get_running_conf(prefix)) - conf.cluster_incremental_sync = inc_sync == "on" + conf.cluster_rpc_sync = rpc_sync == "on" -- we need to briefly spin up a control plane, or else we will get -- error.log entries when our data plane tries to connect @@ -121,7 +121,7 @@ describe("#wasm wasmtime (role: " .. role .. ") (#postgres, #db)", function() status_listen = "off", nginx_main_worker_processes = 2, cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end end) @@ -179,4 +179,4 @@ describe("#wasm wasmtime (role: " .. role .. ") (#postgres, #db)", function() end) -- wasmtime end -- each role -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/03-plugins/09-key-auth/04-hybrid_mode_spec.lua b/spec/03-plugins/09-key-auth/04-hybrid_mode_spec.lua index 9c353732a6f..66f59e40b13 100644 --- a/spec/03-plugins/09-key-auth/04-hybrid_mode_spec.lua +++ b/spec/03-plugins/09-key-auth/04-hybrid_mode_spec.lua @@ -2,10 +2,10 @@ local helpers = require "spec.helpers" for _, v in ipairs({ {"off", "off"}, {"on", "off"}, {"on", "on"}, }) do - local rpc, inc_sync = v[1], v[2] + local rpc, rpc_sync = v[1], v[2] for _, strategy in helpers.each_strategy({"postgres"}) do - describe("Plugin: key-auth (access) [#" .. strategy .. " inc_sync=" .. inc_sync .. "] auto-expiring keys", function() + describe("Plugin: key-auth (access) [#" .. strategy .. " rpc_sync=" .. rpc_sync .. "] auto-expiring keys", function() -- Give a bit of time to reduce test flakyness on slow setups local ttl = 10 local inserted_at @@ -43,7 +43,7 @@ for _, strategy in helpers.each_strategy({"postgres"}) do cluster_telemetry_listen = "127.0.0.1:9006", nginx_conf = "spec/fixtures/custom_nginx.template", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -57,7 +57,7 @@ for _, strategy in helpers.each_strategy({"postgres"}) do cluster_telemetry_endpoint = "127.0.0.1:9006", proxy_listen = "0.0.0.0:9002", cluster_rpc = rpc, - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -129,4 +129,4 @@ for _, strategy in helpers.each_strategy({"postgres"}) do end) end) end -- for _, strategy -end -- for inc_sync +end -- for rpc_sync diff --git a/spec/03-plugins/11-correlation-id/02-schema_spec.lua b/spec/03-plugins/11-correlation-id/02-schema_spec.lua index b02cc906505..e5aa7c3035e 100644 --- a/spec/03-plugins/11-correlation-id/02-schema_spec.lua +++ b/spec/03-plugins/11-correlation-id/02-schema_spec.lua @@ -86,9 +86,9 @@ describe("Plugin: correlation-id (schema) #a [#" .. strategy .."]", function() end) end) - --- XXX FIXME: enable inc_sync = on - for _, inc_sync in ipairs { "off" } do - describe("in hybrid mode" .. " inc_sync=" .. inc_sync, function() + --- XXX FIXME: enable rpc_sync = on + for _, rpc_sync in ipairs { "off" } do + describe("in hybrid mode" .. " rpc_sync=" .. rpc_sync, function() local route lazy_setup(function() route = bp.routes:insert({ @@ -124,7 +124,7 @@ describe("Plugin: correlation-id (schema) #a [#" .. strategy .."]", function() prefix = "servroot", cluster_listen = "127.0.0.1:9005", nginx_conf = "spec/fixtures/custom_nginx.template", - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) assert(helpers.start_kong({ @@ -136,7 +136,7 @@ describe("Plugin: correlation-id (schema) #a [#" .. strategy .."]", function() cluster_control_plane = "127.0.0.1:9005", proxy_listen = "0.0.0.0:9002", status_listen = "127.0.0.1:9100", - cluster_incremental_sync = inc_sync, + cluster_rpc_sync = rpc_sync, })) end) @@ -186,5 +186,5 @@ describe("Plugin: correlation-id (schema) #a [#" .. strategy .."]", function() proxy_client:close() end) end) - end -- for inc_sync + end -- for rpc_sync end)