From 58b39d6dfe3502f32ad97ee24fb2a444298dda8f Mon Sep 17 00:00:00 2001 From: nieyong Date: Wed, 3 Mar 2021 17:32:00 +0800 Subject: [PATCH 1/5] adjust tests desc --- apisix/control/router.lua | 33 +++++++++ apisix/discovery/consul_kv.lua | 1 + apisix/discovery/eureka.lua | 5 ++ docs/en/latest/discovery.md | 32 +++++++- docs/en/latest/discovery/consul_kv.md | 72 +++++++++++++++++- t/control/discovery.t | 102 ++++++++++++++++++++++++++ t/discovery/consul_kv.t | 4 +- 7 files changed, 245 insertions(+), 4 deletions(-) create mode 100644 t/control/discovery.t diff --git a/apisix/control/router.lua b/apisix/control/router.lua index 821cee864874..7b105653496f 100644 --- a/apisix/control/router.lua +++ b/apisix/control/router.lua @@ -19,6 +19,7 @@ local router = require("apisix.utils.router") local builtin_v1_routes = require("apisix.control.v1") local plugin_mod = require("apisix.plugin") local core = require("apisix.core") + local str_sub = string.sub local ipairs = ipairs local type = type @@ -66,6 +67,38 @@ function fetch_control_api_router() end end + local discovery_type = require("apisix.core.config_local").local_conf().discovery + if discovery_type then + local discovery = require("apisix.discovery.init").discovery + local dump_apis = {} + for key, _ in pairs(discovery_type) do + local dis_mod = discovery[key] + -- if discovery module has control_api method, support it + local api_fun = dis_mod.control_api + if api_fun then + local api_route = api_fun() + register_api_routes(routes, api_route) + end + + local dump_data = dis_mod.dump_data + if dump_data then + local item = { + methods = {"GET"}, + uris = {"/v1/discovery/" .. key .. "/dump"}, + handler = function() + return 200, dump_data() + end + } + core.table.insert(dump_apis, item) + end + end + + if #dump_apis > 0 then + core.log.notice("dump_apis: ", core.json.encode(dump_apis, true)) + register_api_routes(routes, dump_apis) + end + end + core.table.clear(v1_routes) register_api_routes(v1_routes, builtin_v1_routes) diff --git a/apisix/discovery/consul_kv.lua b/apisix/discovery/consul_kv.lua index dac442e7ed74..5f5323196e56 100644 --- a/apisix/discovery/consul_kv.lua +++ b/apisix/discovery/consul_kv.lua @@ -410,4 +410,5 @@ function _M.dump_data() return {config = local_conf.discovery.consul_kv, services = applications} end + return _M diff --git a/apisix/discovery/eureka.lua b/apisix/discovery/eureka.lua index 82ee89a10684..009d812b3ab3 100644 --- a/apisix/discovery/eureka.lua +++ b/apisix/discovery/eureka.lua @@ -252,4 +252,9 @@ function _M.init_worker() end +function _M.dump_data() + return {config = local_conf.discovery.eureka, services = applications} +end + + return _M diff --git a/docs/en/latest/discovery.md b/docs/en/latest/discovery.md index 4a98cb2db11e..120518a886f8 100644 --- a/docs/en/latest/discovery.md +++ b/docs/en/latest/discovery.md @@ -32,6 +32,7 @@ title: Integration service discovery registry * [**Initial service discovery**](#initial-service-discovery) * [**Configuration for Eureka**](#configuration-for-eureka) * [**Upstream setting**](#upstream-setting) +* [**Embedded control api for debugging**](#embedded-control-api-for-debugging) * [**Discovery modules**](#discovery-modules) ## Summary @@ -64,7 +65,9 @@ It is very easy for APISIX to extend the discovery client, the basic steps are a 2. Implement the `_M. init_worker()` function for initialization and the `_M. nodes(service_name)` function for obtaining the list of service instance nodes; -3. Convert the registry data into data in APISIX; +3. If you need the discovery module to export the debugging information online, implement the `_M. dump_data()` function; + +4. Convert the registry data into data in APISIX; ### the example of Eureka @@ -88,6 +91,11 @@ Then implement the `_M.init_worker()` function for initialization and the `_M.no function _M.init_worker() ... ... end + + + function _M.dump_data() + ... ... + end return _M @@ -255,6 +263,28 @@ Suppose both A-SERVICE and B-SERVICE provide a `/test` API. The above configurat **Notice**:When configuring `upstream.service_name`, `upstream.nodes` will no longer take effect, but will be replaced by 'nodes' obtained from the registry. +## Embedded control api for debugging + +Sometimes we need the discovery client to export online data snapshot in memory when running for debugging, and if you implement the `_M. dump_data()` function: + +```lua +function _M.dump_data() + return {config = local_conf.discovery.eureka, services = applications} +end +``` + +Then you can call its control api as below: + +```shell +GET /v1/discovery/{discovery_type}/dump +``` + +eg: + +```shell +curl http://127.0.0.1:9090/v1/discovery/eureka/dump +``` + ## Discovery modules - eureka diff --git a/docs/en/latest/discovery/consul_kv.md b/docs/en/latest/discovery/consul_kv.md index c33652965129..985fd5321112 100644 --- a/docs/en/latest/discovery/consul_kv.md +++ b/docs/en/latest/discovery/consul_kv.md @@ -147,4 +147,74 @@ You could find more usage in the `apisix/t/discovery/consul_kv.t` file. ## Debugging API -TODO +It also offers control api for debugging: + +```shell +GET /v1/discovery/consul_kv/dump +``` + +For example: + +```shell +# curl http://127.0.0.1:9090/v1/discovery/consul_kv/dump | jq +{ + "config": { + "fetch_interval": 3, + "timeout": { + "wait": 60, + "connect": 6000, + "read": 6000 + }, + "prefix": "upstreams", + "weight": 1, + "servers": [ + "http://172.19.5.30:8500", + "http://172.19.5.31:8500" + ], + "keepalive": true, + "default_service": { + "host": "172.19.5.11", + "port": 8899, + "metadata": { + "fail_timeout": 1, + "weigth": 1, + "weight": 1, + "max_fails": 1 + } + }, + "skip_keys": [ + "upstreams/myapi/gateway/apisix/" + ] + }, + "services": { + "http://172.19.5.31:8500/v1/kv/upstreams/webpages/": [{ + "host": "127.0.0.1", + "port": 30513, + "weight": 1 + }, + { + "host": "127.0.0.1", + "port": 30514, + "weight": 1 + } + ], + "http://172.19.5.30:8500/v1/kv/upstreams/1614480/grpc/": [{ + "host": "172.19.5.51", + "port": 50051, + "weight": 1 + }], + "http://172.19.5.30:8500/v1/kv/upstreams/webpages/": [{ + "host": "127.0.0.1", + "port": 30511, + "weight": 1 + }, + { + "host": "127.0.0.1", + "port": 30512, + "weight": 1 + } + ] + } +} +``` + diff --git a/t/control/discovery.t b/t/control/discovery.t new file mode 100644 index 000000000000..9d3fa1d0c647 --- /dev/null +++ b/t/control/discovery.t @@ -0,0 +1,102 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +use t::APISIX 'no_plan'; + +repeat_each(1); +no_long_string(); +no_root_location(); +no_shuffle(); +log_level("info"); + + +our $yaml_config = <<_EOC_; +apisix: + enable_control: true + node_listen: 1984 + config_center: yaml + enable_admin: false + +discovery: + eureka: + host: + - "http://127.0.0.1:8761" + prefix: "/eureka/" + fetch_interval: 10 + weight: 80 + timeout: + connect: 1500 + send: 1500 + read: 1500 + consul_kv: + servers: + - "http://127.0.0.1:8500" + - "http://127.0.0.1:8600" + dns: + servers: + - "127.0.0.1:1053" +_EOC_ + + +run_tests(); + +__DATA__ + +=== TEST 1: test consul_kv dump_data api +--- yaml_config eval: $::yaml_config +--- request +GET /v1/discovery/consul_kv/dump +--- error_code: 200 +--- response_body_unlike +^{}$ + + + +=== TEST 2: test eureka dump_data api +--- yaml_config eval: $::yaml_config +--- request +GET /v1/discovery/eureka/dump +--- error_code: 200 +--- response_body_unlike +^{}$ + + + +=== TEST 3: test dns api +--- yaml_config eval: $::yaml_config +--- request +GET /v1/discovery/dns/dump +--- error_code: 404 + + + +=== TEST 4: test unconfiged consul_kv dump_data api +--- yaml_config +apisix: + enable_control: true + node_listen: 1984 + config_center: yaml + enable_admin: false + +discovery: + consul_kv: + servers: + - "http://127.0.0.1:8500" + - "http://127.0.0.1:8600" +#END +--- request +GET /v1/discovery/eureka/dump +--- error_code: 404 diff --git a/t/discovery/consul_kv.t b/t/discovery/consul_kv.t index 3a5e3d6d40a9..842bdd11f137 100644 --- a/t/discovery/consul_kv.t +++ b/t/discovery/consul_kv.t @@ -113,7 +113,7 @@ run_tests(); __DATA__ -=== TEST 1: clean consul kv register nodes +=== TEST 1: prepare consul kv register nodes --- config location /consul1 { rewrite ^/consul1/(.*) /v1/kv/$1 break; @@ -289,7 +289,7 @@ GET /hello -=== TEST 7: test register®ister nodes +=== TEST 7: test register and unregister nodes --- yaml_config eval: $::yaml_config --- apisix_yaml routes: From 882258be90e182c94c7038caf044028fa2377712 Mon Sep 17 00:00:00 2001 From: nieyong Date: Thu, 4 Mar 2021 11:30:15 +0800 Subject: [PATCH 2/5] adjust for ci --- apisix/control/router.lua | 1 + docs/en/latest/discovery.md | 5 ++--- docs/en/latest/discovery/consul_kv.md | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/apisix/control/router.lua b/apisix/control/router.lua index 7b105653496f..49fdc23a47b7 100644 --- a/apisix/control/router.lua +++ b/apisix/control/router.lua @@ -22,6 +22,7 @@ local core = require("apisix.core") local str_sub = string.sub local ipairs = ipairs +local pairs = pairs local type = type local ngx = ngx local get_method = ngx.req.get_method diff --git a/docs/en/latest/discovery.md b/docs/en/latest/discovery.md index 742db82583e9..55f523d763e3 100644 --- a/docs/en/latest/discovery.md +++ b/docs/en/latest/discovery.md @@ -265,7 +265,7 @@ Suppose both A-SERVICE and B-SERVICE provide a `/test` API. The above configurat **Notice**:When configuring `upstream.service_name`, `upstream.nodes` will no longer take effect, but will be replaced by 'nodes' obtained from the registry. -## Embedded control api for debugging +## Embedded control api for debugging Sometimes we need the discovery client to export online data snapshot in memory when running for debugging, and if you implement the `_M. dump_data()` function: @@ -281,7 +281,7 @@ Then you can call its control api as below: GET /v1/discovery/{discovery_type}/dump ``` -eg: +eg: ```shell curl http://127.0.0.1:9090/v1/discovery/eureka/dump @@ -291,4 +291,3 @@ curl http://127.0.0.1:9090/v1/discovery/eureka/dump - eureka - [Consul KV](discovery/consul_kv.md) - diff --git a/docs/en/latest/discovery/consul_kv.md b/docs/en/latest/discovery/consul_kv.md index 985fd5321112..625d71176998 100644 --- a/docs/en/latest/discovery/consul_kv.md +++ b/docs/en/latest/discovery/consul_kv.md @@ -217,4 +217,3 @@ For example: } } ``` - From fb8f82de0066da6514efb90464215dc8ed54e078 Mon Sep 17 00:00:00 2001 From: nieyong Date: Thu, 4 Mar 2021 14:39:08 +0800 Subject: [PATCH 3/5] adjust for CI --- docs/en/latest/discovery.md | 2 +- docs/en/latest/discovery/consul_kv.md | 118 +++++++++++++------------- 2 files changed, 62 insertions(+), 58 deletions(-) diff --git a/docs/en/latest/discovery.md b/docs/en/latest/discovery.md index 55f523d763e3..60985cb7d737 100644 --- a/docs/en/latest/discovery.md +++ b/docs/en/latest/discovery.md @@ -93,7 +93,7 @@ Then implement the `_M.init_worker()` function for initialization and the `_M.no function _M.init_worker() ... ... end - + function _M.dump_data() ... ... diff --git a/docs/en/latest/discovery/consul_kv.md b/docs/en/latest/discovery/consul_kv.md index 625d71176998..44b684d9f6cd 100644 --- a/docs/en/latest/discovery/consul_kv.md +++ b/docs/en/latest/discovery/consul_kv.md @@ -158,62 +158,66 @@ For example: ```shell # curl http://127.0.0.1:9090/v1/discovery/consul_kv/dump | jq { - "config": { - "fetch_interval": 3, - "timeout": { - "wait": 60, - "connect": 6000, - "read": 6000 - }, - "prefix": "upstreams", - "weight": 1, - "servers": [ - "http://172.19.5.30:8500", - "http://172.19.5.31:8500" - ], - "keepalive": true, - "default_service": { - "host": "172.19.5.11", - "port": 8899, - "metadata": { - "fail_timeout": 1, - "weigth": 1, - "weight": 1, - "max_fails": 1 - } - }, - "skip_keys": [ - "upstreams/myapi/gateway/apisix/" - ] - }, - "services": { - "http://172.19.5.31:8500/v1/kv/upstreams/webpages/": [{ - "host": "127.0.0.1", - "port": 30513, - "weight": 1 - }, - { - "host": "127.0.0.1", - "port": 30514, - "weight": 1 - } - ], - "http://172.19.5.30:8500/v1/kv/upstreams/1614480/grpc/": [{ - "host": "172.19.5.51", - "port": 50051, - "weight": 1 - }], - "http://172.19.5.30:8500/v1/kv/upstreams/webpages/": [{ - "host": "127.0.0.1", - "port": 30511, - "weight": 1 - }, - { - "host": "127.0.0.1", - "port": 30512, - "weight": 1 - } - ] - } + "config": { + "fetch_interval": 3, + "timeout": { + "wait": 60, + "connect": 6000, + "read": 6000 + }, + "prefix": "upstreams", + "weight": 1, + "servers": [ + "http://172.19.5.30:8500", + "http://172.19.5.31:8500" + ], + "keepalive": true, + "default_service": { + "host": "172.19.5.11", + "port": 8899, + "metadata": { + "fail_timeout": 1, + "weigth": 1, + "weight": 1, + "max_fails": 1 + } + }, + "skip_keys": [ + "upstreams/myapi/gateway/apisix/" + ] + }, + "services": { + "http://172.19.5.31:8500/v1/kv/upstreams/webpages/": [ + { + "host": "127.0.0.1", + "port": 30513, + "weight": 1 + }, + { + "host": "127.0.0.1", + "port": 30514, + "weight": 1 + } + ], + "http://172.19.5.30:8500/v1/kv/upstreams/1614480/grpc/": [ + { + "host": "172.19.5.51", + "port": 50051, + "weight": 1 + } + ], + "http://172.19.5.30:8500/v1/kv/upstreams/webpages/": [ + { + "host": "127.0.0.1", + "port": 30511, + "weight": 1 + }, + { + "host": "127.0.0.1", + "port": 30512, + "weight": 1 + } + ] + } } ``` From 2a3a4fef6260d2b679c56eb3a141ebf07cadc00c Mon Sep 17 00:00:00 2001 From: nieyong Date: Fri, 5 Mar 2021 13:31:22 +0800 Subject: [PATCH 4/5] adjust for suggestion --- apisix/discovery/eureka.lua | 2 +- docs/en/latest/discovery.md | 6 +- t/control/discovery.t | 110 +++++++++++++++++++++++++++++++++--- 3 files changed, 106 insertions(+), 12 deletions(-) diff --git a/apisix/discovery/eureka.lua b/apisix/discovery/eureka.lua index 009d812b3ab3..1dd35630a974 100644 --- a/apisix/discovery/eureka.lua +++ b/apisix/discovery/eureka.lua @@ -253,7 +253,7 @@ end function _M.dump_data() - return {config = local_conf.discovery.eureka, services = applications} + return {config = local_conf.discovery.eureka, services = applications or {}} end diff --git a/docs/en/latest/discovery.md b/docs/en/latest/discovery.md index 60985cb7d737..75d4525a119f 100644 --- a/docs/en/latest/discovery.md +++ b/docs/en/latest/discovery.md @@ -65,9 +65,9 @@ It is very easy for APISIX to extend the discovery client, the basic steps are a 1. Add the implementation of registry client in the 'apisix/discovery/' directory; -2. Implement the `_M. init_worker()` function for initialization and the `_M. nodes(service_name)` function for obtaining the list of service instance nodes; +2. Implement the `_M.init_worker()` function for initialization and the `_M.nodes(service_name)` function for obtaining the list of service instance nodes; -3. If you need the discovery module to export the debugging information online, implement the `_M. dump_data()` function; +3. If you need the discovery module to export the debugging information online, implement the `_M.dump_data()` function; 4. Convert the registry data into data in APISIX; @@ -96,7 +96,7 @@ Then implement the `_M.init_worker()` function for initialization and the `_M.no function _M.dump_data() - ... ... + return {config = your_config, services = your_services, other = ... } end diff --git a/t/control/discovery.t b/t/control/discovery.t index 9d3fa1d0c647..93cd15cf04f3 100644 --- a/t/control/discovery.t +++ b/t/control/discovery.t @@ -57,21 +57,47 @@ __DATA__ === TEST 1: test consul_kv dump_data api --- yaml_config eval: $::yaml_config +--- config + location /t { + content_by_lua_block { + local json = require("toolkit.json") + local t = require("lib.test_admin") + + local code, body, res = t.test('/v1/discovery/consul_kv/dump', + ngx.HTTP_GET) + local entity = json.decode(res) + ngx.say(json.encode(entity.services)) + ngx.say(json.encode(entity.config)) + } + } --- request -GET /v1/discovery/consul_kv/dump +GET /t --- error_code: 200 ---- response_body_unlike -^{}$ +--- response_body +{} +{"fetch_interval":3,"keepalive":true,"prefix":"upstreams","servers":["http://127.0.0.1:8500","http://127.0.0.1:8600"],"timeout":{"connect":2000,"read":2000,"wait":60},"weight":1} === TEST 2: test eureka dump_data api --- yaml_config eval: $::yaml_config +--- config + location /t { + content_by_lua_block { + local json = require("toolkit.json") + local t = require("lib.test_admin") + + local code, body, res = t.test('/v1/discovery/eureka/dump', + ngx.HTTP_GET) + local entity = json.decode(res) + ngx.say(json.encode(entity)) + } + } --- request -GET /v1/discovery/eureka/dump +GET /t --- error_code: 200 ---- response_body_unlike -^{}$ +--- response_body +{"config":{"fetch_interval":10,"host":["http://127.0.0.1:8761"],"prefix":"/eureka/","timeout":{"connect":1500,"read":1500,"send":1500},"weight":80},"services":{}} @@ -83,14 +109,13 @@ GET /v1/discovery/dns/dump -=== TEST 4: test unconfiged consul_kv dump_data api +=== TEST 4: test unconfiged eureka dump_data api --- yaml_config apisix: enable_control: true node_listen: 1984 config_center: yaml enable_admin: false - discovery: consul_kv: servers: @@ -100,3 +125,72 @@ discovery: --- request GET /v1/discovery/eureka/dump --- error_code: 404 + + + +=== TEST 5: prepare consul kv register nodes +--- config +location /consul1 { + rewrite ^/consul1/(.*) /v1/kv/$1 break; + proxy_pass http://127.0.0.1:8500; +} + +location /consul2 { + rewrite ^/consul2/(.*) /v1/kv/$1 break; + proxy_pass http://127.0.0.1:8600; +} +--- pipelined_requests eval +[ + "DELETE /consul1/upstreams/?recurse=true", + "DELETE /consul2/upstreams/webpages/?recurse=true", + "PUT /consul1/upstreams/webpages/127.0.0.1:30511\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", + "PUT /consul1/upstreams/webpages/127.0.0.1:30512\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", + "PUT /consul2/upstreams/webpages/127.0.0.1:30513\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", + "PUT /consul2/upstreams/webpages/127.0.0.1:30514\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", +] +--- response_body eval +["true", "true", "true", "true", "true", "true"] + + + +=== TEST 6: dump consul_kv services +--- yaml_config eval: $::yaml_config +--- config + location /t { + content_by_lua_block { + local json = require("toolkit.json") + local t = require("lib.test_admin") + ngx.sleep(2) + + local code, body, res = t.test('/v1/discovery/consul_kv/dump', + ngx.HTTP_GET) + local entity = json.decode(res) + ngx.say(json.encode(entity.services)) + } + } +--- request +GET /t +--- error_code: 200 +--- response_body +{"http://127.0.0.1:8500/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30511,"weight":1},{"host":"127.0.0.1","port":30512,"weight":1}],"http://127.0.0.1:8600/v1/kv/upstreams/1614480/webpages/":[{"host":"172.19.5.12","port":8000,"weight":120},{"host":"172.19.5.13","port":8000,"weight":120}],"http://127.0.0.1:8600/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30513,"weight":1},{"host":"127.0.0.1","port":30514,"weight":1}]} + + + +=== TEST 7: clean consul kv register nodes +--- config +location /consul1 { + rewrite ^/consul1/(.*) /v1/kv/$1 break; + proxy_pass http://127.0.0.1:8500; +} + +location /consul2 { + rewrite ^/consul2/(.*) /v1/kv/$1 break; + proxy_pass http://127.0.0.1:8600; +} +--- pipelined_requests eval +[ + "DELETE /consul1/upstreams/?recurse=true", + "DELETE /consul2/upstreams/webpages/?recurse=true" +] +--- response_body eval +["true", "true"] From cba3743585723a7467ce9083b277ffa942af9bab Mon Sep 17 00:00:00 2001 From: nieyong Date: Fri, 5 Mar 2021 15:49:41 +0800 Subject: [PATCH 5/5] bugfix for ci --- t/control/discovery.t | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/control/discovery.t b/t/control/discovery.t index 93cd15cf04f3..c36b124352e2 100644 --- a/t/control/discovery.t +++ b/t/control/discovery.t @@ -142,7 +142,7 @@ location /consul2 { --- pipelined_requests eval [ "DELETE /consul1/upstreams/?recurse=true", - "DELETE /consul2/upstreams/webpages/?recurse=true", + "DELETE /consul2/upstreams/?recurse=true", "PUT /consul1/upstreams/webpages/127.0.0.1:30511\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", "PUT /consul1/upstreams/webpages/127.0.0.1:30512\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", "PUT /consul2/upstreams/webpages/127.0.0.1:30513\n" . "{\"weight\": 1, \"max_fails\": 2, \"fail_timeout\": 1}", @@ -172,7 +172,7 @@ location /consul2 { GET /t --- error_code: 200 --- response_body -{"http://127.0.0.1:8500/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30511,"weight":1},{"host":"127.0.0.1","port":30512,"weight":1}],"http://127.0.0.1:8600/v1/kv/upstreams/1614480/webpages/":[{"host":"172.19.5.12","port":8000,"weight":120},{"host":"172.19.5.13","port":8000,"weight":120}],"http://127.0.0.1:8600/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30513,"weight":1},{"host":"127.0.0.1","port":30514,"weight":1}]} +{"http://127.0.0.1:8500/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30511,"weight":1},{"host":"127.0.0.1","port":30512,"weight":1}],"http://127.0.0.1:8600/v1/kv/upstreams/webpages/":[{"host":"127.0.0.1","port":30513,"weight":1},{"host":"127.0.0.1","port":30514,"weight":1}]} @@ -190,7 +190,7 @@ location /consul2 { --- pipelined_requests eval [ "DELETE /consul1/upstreams/?recurse=true", - "DELETE /consul2/upstreams/webpages/?recurse=true" + "DELETE /consul2/upstreams/?recurse=true" ] --- response_body eval ["true", "true"]