Ben0625 opened a new issue #4102:
URL: https://github.com/apache/apisix/issues/4102
### Environment
* apisix version: 2.0
* OS: 3.10.0-693.el7.x86_64
* OpenResty version: openresty/1.17.8.2
* etcd version: 3.4.13
* apisix-dashboard version: 2.0
### Minimal test code / Steps to reproduce the issue
1. Set a route with only one upstream. Add active and passive healthcheck.
2. Send requests.
### What's the actual result?
Even if this upstream always return 500, the passive healthcheck does not
work to set this node to be unhealthy. Every request will still be passed to
this upstream.
It seems that the checker is not created at all, even after I set this
upstream return 200.
The route config in etcd:
```
{
"id": "route_2050210843",
"create_time": 1618455175,
"update_time": 1619011016,
"uris": ["/test1.do"],
"name": "route-2050210843",
"desc": "health_check_test",
"methods": ["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"],
"vars": [],
"upstream": {
"nodes": [{
"host": "172.25.69.182",
"port": 8080,
"weight": 1
}],
"timeout": {
"connect": 6,
"read": 6,
"send": 6
},
"type": "roundrobin",
"checks": {
"active": {
"healthy": {
"interval": 100,
"successes": 10
},
"host": "172.25.69.182",
"http_path": "/check.do",
"req_headers": [""],
"timeout": 3,
"unhealthy": {
"http_failures": 5,
"interval": 3
}
},
"passive": {
"healthy": {
"http_statuses": [200],
"successes": 2
},
"unhealthy": {
"http_failures": 1,
"http_statuses": [500, 502, 504],
"tcp_failures": 1
}
}
}
},
"labels": {
"serve": "2050210843"
}
}
```
### What's the expected result?
The checker for this upstream is created and can be set to unhealthy state
when failures reach passive.unhealthy.http_failures.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]