wangwei0326 opened a new issue, #13385:
URL: https://github.com/apache/apisix/issues/13385

   ### Current Behavior
   
   After a node is deleted from the upstream, its information can still be 
queried from the health check interface.
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   before delete:
   curl http://127.0.0.1:9180/apisix/admin/upstreams/619149297325179581 -H 
"X-API-KEY: xxxxxxxxxxxxxxxxxxxx"
   {
       "createdIndex": 13033,
       "key": "/apisix/upstreams/619149297325179581",
       "modifiedIndex": 13117,
       "value": {
           "checks": {
               "active": {
                   "concurrency": 10,
                   "healthy": {
                       "http_statuses": [
                           200,
                           302
                       ],
                       "interval": 1,
                       "successes": 2
                   },
                   "http_path": "/",
                   "timeout": 1,
                   "type": "tcp",
                   "unhealthy": {
                       "http_failures": 5,
                       "http_statuses": [
                           429,
                           404,
                           500,
                           501,
                           502,
                           503,
                           504,
                           505
                       ],
                       "interval": 1,
                       "tcp_failures": 2,
                       "timeouts": 3
                   }
               }
           },
           "create_time": 1778571339,
           "id": "619149297325179581",
           "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
           },
           "name": "app-robo-advisor-api",
           "nodes": {
               "10.195.26.32:8600": 1,
               "10.195.26.33:8600": 1,
               "10.205.102.167:8900": 1
           },
           "pass_host": "pass",
           "scheme": "http",
           "timeout": {
               "connect": 6,
               "read": 6,
               "send": 6
           },
           "type": "roundrobin",
           "update_time": 1778580748
       }
   } 
   
   curl http://127.0.0.1:9090/v1/healthcheck/upstreams/619149297325179581
   {
       "name": "/apisix/upstreams/619149297325179581",
       "nodes": [
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.205.102.167",
               "ip": "10.205.102.167",
               "port": 8600,
               "purge_time": 1778580075.06,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.195.26.32",
               "ip": "10.195.26.32",
               "port": 8600,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.195.26.33",
               "ip": "10.195.26.33",
               "port": 8600,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 0,
                   "tcp_failure": 2,
                   "timeout_failure": 0
               },
               "hostname": "10.205.102.167",
               "ip": "10.205.102.167",
               "port": 8900,
               "status": "unhealthy"
           }
       ],
       "type": "tcp"
   }
   
   after delete:
   curl http://10.150.229.139:9180/apisix/admin/upstreams/619149297325179581 -H 
"X-API-KEY: xxxxxxxxxxxxxxxxxxxxxx"
   {
       "createdIndex": 13033,
       "key": "/apisix/upstreams/619149297325179581",
       "modifiedIndex": 13121,
       "value": {
           "checks": {
               "active": {
                   "concurrency": 10,
                   "healthy": {
                       "http_statuses": [
                           200,
                           302
                       ],
                       "interval": 1,
                       "successes": 2
                   },
                   "http_path": "/",
                   "timeout": 1,
                   "type": "tcp",
                   "unhealthy": {
                       "http_failures": 5,
                       "http_statuses": [
                           429,
                           404,
                           500,
                           501,
                           502,
                           503,
                           504,
                           505
                       ],
                       "interval": 1,
                       "tcp_failures": 2,
                       "timeouts": 3
                   }
               }
           },
           "create_time": 1778571339,
           "id": "619149297325179581",
           "keepalive_pool": {
               "idle_timeout": 60,
               "requests": 1000,
               "size": 320
           },
           "name": "app-robo-advisor-api",
           "nodes": {
               "10.195.26.32:8600": 1,
               "10.195.26.33:8600": 1
           },
           "pass_host": "pass",
           "scheme": "http",
           "timeout": {
               "connect": 6,
               "read": 6,
               "send": 6
           },
           "type": "roundrobin",
           "update_time": 1779087710
       }
   }
   
   
   
   curl http://127.0.0.1:9090/v1/healthcheck/upstreams/619149297325179581
   
   {
       "name": "/apisix/upstreams/619149297325179581",
       "nodes": [
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.205.102.167",
               "ip": "10.205.102.167",
               "port": 8600,
               "purge_time": 1778580075.06,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.195.26.32",
               "ip": "10.195.26.32",
               "port": 8600,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 2,
                   "tcp_failure": 0,
                   "timeout_failure": 0
               },
               "hostname": "10.195.26.33",
               "ip": "10.195.26.33",
               "port": 8600,
               "status": "healthy"
           },
           {
               "counter": {
                   "http_failure": 0,
                   "success": 0,
                   "tcp_failure": 2,
                   "timeout_failure": 0
               },
               "hostname": "10.205.102.167",
               "ip": "10.205.102.167",
               "port": 8900,
               "status": "unhealthy"
           }
       ],
       "type": "tcp"
   }
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.16
   - Operating system (run `uname -a`):  ubuntu 
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): nginx 
version: openresty/1.27.1.2
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`): 3.5
   - APISIX Dashboard version, if relevant:
   - Plugin runner version, for issues related to plugin runners:
   - LuaRocks version, for installation issues (run `luarocks --version`):
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to