yongboy opened a new issue #3423:
URL: https://github.com/apache/apisix/issues/3423
When I enable service discovery, eg `consul_kv.lua`, and export the string
type of port value by `_M.nodes(service_name)`,
then add `healthcheck` function for the service discovery within the
upstream object, when called`cecker:get_target_status`, I got the `nil, "target
not found"` response always, leading to the `healthcheck` does not affect
the invalid nodes at all :(
So, I should make some changes.
The `consul_kv.lua` old way:
```lua
local function parse_instance(instance)
......
return ip, port, instance.metadata
end
```
Now, I should return the `tonumber(port)` value as below:
```lua
local function parse_instance(instance)
......
return ip, tonumber(port), instance.metadata
end
```
:))
----------------------------------------------------------------
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]